Systems and methods for securing communications

ABSTRACT

Techniques for securing communication. The techniques include using at least one device to perform: selecting a first operation from a plurality of operations, each of the plurality of operations associated with a respective type of data to be encrypted; generating first data to be encrypted at least in part by performing the first operation; encrypting both information identifying the first operation and the first data to obtain corresponding first ciphertext; and outputting the first ciphertext.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims the benefit under 35 U.S.C. § 120 and isa continuation of U.S. application Ser. No. 16/450,934, filed Jun. 24,2019, entitled “SYSTEMS AND METHODS FOR SECURING COMMUNICATIONS”,bearing Attorney Docket No. V0324.70000US02, which claims the benefitunder 35 U.S.C. § 119(e) of U.S. Provisional Application No. 62/689,379,filed on Jun. 25, 2018, entitled “SYSTEMS AND METHODS FOR AUTHENTICATEDENCRYPTION,” bearing Attorney Docket No. V0324.70000US00, and of U.S.Provisional Application No. 62/833,988, filed on Apr. 15, 2019, entitled“SYSTEMS AND METHODS FOR SECURING COMMUNICATIONS,” bearing AttorneyDocket No. V0324.70000US01, each of which is incorporated by referenceherein in its entirety.

BACKGROUND

Cryptographic techniques may be used to protect communication systems.For instance, encryption techniques based on symmetric cryptography andasymmetric cryptography may be used to protect confidentiality, whilesignature techniques based on asymmetric cryptography, as well ashashing techniques, may be used to protect integrity.

Symmetric cryptography may be less computationally intensive thanasymmetric cryptography, and therefore may be more suitable forapplications that operate in resource-constrained environments (e.g.,mobile device, Internet-of-Things devices, etc.) and/or have highperformance expectations (e.g., real time audio/video streaming).However, symmetric cryptography may become vulnerable to cryptanalysisattacks if the same symmetric key is repeatedly used to encryptmessages. For instance, by capturing and analyzing ciphertext fromdifferent messages, an attacker may be able to detect patterns andrecover some or all of the corresponding plaintext.

SUMMARY

Some embodiments are directed to at least one non-transitorycomputer-readable storage medium storing processor-executableinstructions that, when executed by at least one device, cause the atleast one device to perform a method of encryption. The method comprisesselecting a first operation from a plurality of operations, each of theplurality of operations associated with a respective type of data to beencrypted; generating first data to be encrypted at least in part byperforming the first operation; encrypting both information identifyingthe first operation and the first data to obtain corresponding firstciphertext; and outputting the first ciphertext.

Some embodiments are directed to a method of encryption, the methodcomprising using at least one processor to perform: selecting a firstoperation from a plurality of operations, each of the plurality ofoperations associated with a respective type of data to be encrypted;generating first data to be encrypted at least in part by performing thefirst operation; encrypting both information identifying the firstoperation and the first data to obtain corresponding first ciphertext;and outputting the first ciphertext.

Some embodiments are directed to a system, the system comprising atleast one processor and at least one non-transitory computer-readablestorage medium storing processor-executable instructions that, whenexecuted by the at least one processor, cause the at least one processorto perform a method of encryption. The method comprises selecting afirst operation from a plurality of operations, each of the plurality ofoperations associated with a respective type of data to be encrypted;generating first data to be encrypted at least in part by performing thefirst operation; encrypting both information identifying the firstoperation and the first data to obtain corresponding first ciphertext;and outputting the first ciphertext.

In some embodiments, each operation of the plurality of operations isassociated with a respective probability of a plurality ofprobabilities, and selecting the first operation comprises: selectingthe first operation from the plurality of operations using the pluralityof probabilities.

In some embodiments, the plurality of operations includes an operationfor obtaining at least a portion of an input message to be output, anoperation for obtaining a salt value, and an operation for changing thestate of the at least one device.

In some embodiments, the first operation is an operation for changingthe state of the at least one device, and performing the first operationcauses at least one parameter in the state of the at least one device tobe updated.

In some embodiments, the method comprises using a software program toperform the selecting, generating, encrypting and outputting acts, andwherein executing the first operation causes at least one parameter inthe state of the software program to be updated.

In some embodiments, encrypting the first data is performed using anencryption module having at least one parameter, and performing thefirst operation causes at least one parameter of the encryption moduleto be updated.

In some embodiments, performing the first operation comprises changingat least one probability for selecting an operation from the pluralityof operations.

In some embodiments, generating the first data comprises generatinginformation indicating at least one update to the at least one parameterin the state of the at least one device, and encrypting the first datacomprises encrypting the information indicating the at least one updateto the at least one parameter.

In some embodiments, when the first operation is an operation forobtaining a salt value, generating the first data comprises obtaining afirst salt value, and encrypting the first data comprises encrypting thefirst salt value.

In some embodiments, obtaining the first salt value comprisesdetermining a target length of the salt using one or more sources ofrandomness; and generating, as the first salt value, a value having thetarget length using the one or more sources of randomness.

In some embodiments, the one or more sources of randomness includeinformation associated with one or more of the plurality of operationspreviously performed by the at least one computing device.

In some embodiments, when the first operation is an operation forobtaining at least a part of input data to be encrypted, generating thefirst data comprises obtaining a first portion of an input message to betransmitted; and encrypting the first data comprises encrypting thefirst portion of the input message.

In some embodiments, encrypting the first data comprises encrypting thefirst data using a block cipher, a stream cipher, a substitution cipher,a polyalphabetic cipher, a public key encryption algorithm, and/or asymmetric-key encryption algorithm.

In some embodiments, the at least one parameter of the encryption modulecomprises a symmetric key, an initialization vector for a block cipher,an initialization vector for a stream cipher, and/or a substitutionalphabet for a polyalphabetic cipher.

In some embodiments, encrypting the first data comprises encrypting thefirst data using a randomized partitioned permutation cipher.

In some embodiments, the randomized partitioned permutation cipher isassociated with a plurality of languages including a first language; andafter outputting the first ciphertext and before selecting a secondoperation from the plurality of operations, the method further comprisesselecting a second language from the plurality of languages.

In some embodiments, the state of the encryption module includes one ormore parameters specifying a permutation of a set of ciphertext symbolsand one or more parameters specifying a partition of the permutation.

In some embodiments, updating the at least one parameter using at leastone random value obtained from one or more sources of randomness.

In some embodiments, the method further comprises: transforming thefirst data after it is generated to obtain transformed first data, andencrypting the first data comprises encrypting the transformed firstdata.

In some embodiments, transforming the first data is performed using oneor more random values obtained using one or more sources of randomness.

In some embodiments, the method further comprises transforming the firstciphertext to obtained transformed ciphertext, and transmitting thefirst ciphertext comprises transmitting the transformed ciphertext.

In some embodiments, outputting the first ciphertext comprisestransmitting the first ciphertext to an another device via acommunication channel. In some embodiments, outputting the firstciphertext comprises storing the first ciphertext in a memory.

Some embodiments are directed to a method for decrypting receivedciphertext at a decryption device, the method comprising using thedecryption device to perform: obtaining a first ciphertext; decryptingthe first ciphertext to obtain corresponding first plaintext;identifying, from the first plaintext, a first operation of a pluralityof operations, wherein the first operation is an operation for changinga state of the decryption device; and performing the first operation tochange the state of the decryption device.

Some embodiments are directed to a system comprising at least oneprocessor and at least one non-transitory computer-readable storagemedium storing instructions that, when executed by the at least oneprocessor, cause the at least one processor to perform a method fordecrypting received ciphertext at a decryption device, the methodcomprising using the decryption device to perform: obtaining a firstciphertext; decrypting the first ciphertext to obtain correspondingfirst plaintext; identifying, from the first plaintext, a firstoperation of a plurality of operations, wherein the first operation isan operation for changing a state of the decryption device; andperforming the first operation to change the state of the decryptiondevice.

Some embodiments are directed to at least one non-transitorycomputer-readable storage medium storing instructions that, whenexecuted by at least one processor, cause the at least one processor toperform a method for decrypting received ciphertext at a decryptiondevice, the method comprising using the decryption device to perform:obtaining a first ciphertext; decrypting the first ciphertext to obtaincorresponding first plaintext; identifying, from the first plaintext, afirst operation of a plurality of operations, wherein the firstoperation is an operation for changing a state of the decryption device;and performing the first operation to change the state of the decryptiondevice.

In some embodiments, the method for decrypting comprises using asoftware program including a decryption module to perform the obtaining,decrypting, identifying, and performing, and wherein performing thefirst operation comprises changing at least one value of at least oneparameter of a decryption module using information in the firstplaintext.

In some embodiments, the method for decrypting further comprises usingthe decryption device to perform: identifying, from the first plaintext,a second operation of the plurality of operations, wherein the secondoperation is an operation for obtaining a portion of an input message tobe transmitted, and wherein performing the first operation comprisesobtaining the portion of the input message from the first plaintext.

Some embodiments are directed to a method for encrypting input datausing a cipher associated with a plurality of languages including afirst language, the first language associated with a first set ofciphertext symbols, a first permutation for the first set, and a firstpartition for the first permutation. The method comprises using at leastone processor to perform: obtaining, from the input data, a firstplaintext symbol; mapping the first plaintext symbol to a firstciphertext symbol using the cipher, the mapping comprising: identifyinga first set of candidate ciphertext symbols using the first plaintextsymbol, the first permutation, and the first partition; and identifying,at random, the first ciphertext symbol from the first set of candidateciphertext symbols; and outputting the first ciphertext symbol.

Some embodiments are directed to at least one non-transitorycomputer-readable storage medium storing processor-executableinstructions that, when executed by at least one computing device, causethe at least one computing device to perform a method for encryptinginput data using a cipher associated with a plurality of languagesincluding a first language, the first language associated with a firstset of ciphertext symbols, a first permutation for the first set, and afirst partition for the first permutation. The method comprises using atleast one processor to perform: obtaining, from the input data, a firstplaintext symbol; mapping the first plaintext symbol to a firstciphertext symbol using the cipher, the mapping comprising: identifyinga first set of candidate ciphertext symbols using the first plaintextsymbol, the first permutation, and the first partition; and identifying,at random, the first ciphertext symbol from the first set of candidateciphertext symbols; and outputting the first ciphertext symbol.

Some embodiments are directed to a system, comprising at least onecomputer hardware processor; and at least one non-transitorycomputer-readable storage medium storing processor-executableinstructions that, when executed by at least one computing device, causethe at least one computing device to perform a method for encryptinginput data using a cipher associated with a plurality of languagesincluding a first language, the first language associated with a firstset of ciphertext symbols, a first permutation for the first set, and afirst partition for the first permutation. The method comprises usingthe at least one processor to perform: obtaining, from the input data, afirst plaintext symbol; mapping the first plaintext symbol to a firstciphertext symbol using the cipher, the mapping comprising: identifyinga first set of candidate ciphertext symbols using the first plaintextsymbol, the first permutation, and the first partition; and identifying,at random, the first ciphertext symbol from the first set of candidateciphertext symbols; and outputting the first ciphertext symbol.

In some embodiments, the method comprises: selecting the first languagefrom the plurality of languages before mapping the first plaintextsymbol to the first ciphertext symbol.

In some embodiments, selecting the first language comprises: generatingthe first permutation for the first set using one or more sources ofrandomness; and generating the first partition for the firstpermutation.

In some embodiments, generating the first partition for the firstpermutation comprises: identifying a set of active ciphertext symbolsamong the first set of ciphertext symbols; and identifying, as the firstpartition, multiple mutually disjoint proper subsets of the set ofactive ciphertext symbols, wherein the multiple proper subsets cover theset of active ciphertext symbols. In some embodiments, selecting thefirst language further comprises: generating a first decryption vectorusing the first permutation and the first partition.

In some embodiments, the method comprises: using the decryption vector,mapping the first ciphertext symbol to the first plaintext symbol; andoutputting the first plaintext symbol.

In some embodiments, the first partition comprises multiple mutuallydisjoint proper subsets of the first set of ciphertext symbols, andwherein each of the multiple proper subsets contains a same number ofciphertext symbols.

In some embodiments, the first partition comprises multiple mutuallydisjoint proper subsets of the first set of ciphertext symbols, andwherein at least two of the multiple proper subsets contain a differentnumber of ciphertext symbols.

In some embodiments, the plurality of languages includes a secondlanguage associated with the first set of ciphertext symbols, a secondpermutation for the first set and different from the first permutation,and a second partition for the first permutation, the method furthercomprising: obtaining, from the input data, a second plaintext symbol;mapping the second plaintext symbol to a second ciphertext symbol usingthe randomized partitioned permutation cipher, the mapping comprising:identifying a second set of candidate ciphertext symbols using thesecond plaintext symbol, the second permutation, and the secondpartition; identifying, at random, the second ciphertext symbol randomlyfrom the second set of candidate ciphertext symbols; and outputting thesecond ciphertext symbol.

In some embodiments, after outputting the first ciphertext symbol andbefore mapping the second plaintext symbol to a second ciphertextsymbol, the method further comprising selecting the second language fromthe plurality of languages.

In some embodiments, outputting the first ciphertext symbol comprisestransmitting the first ciphertext symbol to another device using acommunication channel. In some embodiments, outputting the firstciphertext symbol comprises storing the first ciphertext symbol.

In some embodiments, the method comprises: when using the first languagefor mapping plaintext symbols to respective ciphertext symbols, mappingeach of the plaintext symbols, including the first plaintext symbol, torespective ciphertext symbols only in a proper subset of the first setof ciphertext symbols.

Some embodiments are directed to a method for decrypting encrypted data,the encrypted data encrypted using a cipher associated with a pluralityof languages including a first language, the first language associatedwith a first set of ciphertext symbols, a first permutation for thefirst set, and a first partition for the first permutation. The methodcomprises: obtaining, from the encrypted data, a first ciphertextsymbol; obtaining a first decryption vector for the first language;mapping the first ciphertext symbol to a first plaintext symbol usingthe first decryption vector; and outputting the first plaintext symbol.

Some embodiments are directed to a system comprising at least oneprocessor and at least one non-transitory computer-readable storagemedium storing instructions that, when executed by the at least oneprocessor, cause the at least one processor to perform a method fordecrypting encrypted data, the encrypted data encrypted using a cipherassociated with a plurality of languages including a first language, thefirst language associated with a first set of ciphertext symbols, afirst permutation for the first set, and a first partition for the firstpermutation. The method comprises: obtaining, from the encrypted data, afirst ciphertext symbol; obtaining a first decryption vector for thefirst language; mapping the first ciphertext symbol to a first plaintextsymbol using the first decryption vector; and outputting the firstplaintext symbol.

Some embodiments are directed to at least one non-transitorycomputer-readable storage medium storing instructions that, whenexecuted by at least one processor, cause the at least one processor toperform a method for decrypting encrypted data, the encrypted dataencrypted using a cipher associated with a plurality of languagesincluding a first language, the first language associated with a firstset of ciphertext symbols, a first permutation for the first set, and afirst partition for the first permutation. The method comprises:obtaining, from the encrypted data, a first ciphertext symbol; obtaininga first decryption vector for the first language; mapping the firstciphertext symbol to a first plaintext symbol using the first decryptionvector; and outputting the first plaintext symbol.

In some embodiments the method for decrypting encrypted data furtherincludes: identifying a subset of active ciphertext symbols among thefirst set of ciphertext symbols; and detecting tampering at least inpart by determining whether the first ciphertext symbol is in the activesubset.

The foregoing is a non-limiting summary of the invention, which isdefined by the attached claims.

BRIEF DESCRIPTION OF DRAWINGS

Various aspects and embodiments will be described with reference to thefollowing figures. It should be appreciated that the figures are notnecessarily drawn to scale.

FIG. 1 shows an illustrative communication system 100, in accordancewith some embodiments of the technology described herein.

FIG. 2A shows an illustrative process 200 for randomized encryption, inaccordance with some embodiments of the technology described herein.

FIG. 2B shows an illustrative process 210 for randomized decryption, inaccordance with some embodiments of the technology described herein.

FIG. 3 shows an illustrative state machine 300, in accordance with someembodiments of the technology described herein.

FIG. 4 shows an illustrative state machine 400, in accordance with someembodiments of the technology described herein.

FIG. 5 shows illustrative transformations that may be performed at anencryption device, in accordance with some embodiments of the technologydescribed herein.

FIG. 6 shows illustrative transformations that may be performed at adecryption device, in accordance with some embodiments of the technologydescribed herein.

FIG. 7 shows an illustrative encoding system 700, in accordance withsome embodiments of the technology described herein.

FIG. 8 shows an illustrative command probability vector, in accordancewith some embodiments of the technology described herein.

FIG. 9 shows an illustrative stream of commands and correspondingciphertext, in accordance with some embodiments of the technologydescribed herein.

FIG. 10 shows an illustrative decoding system 1000, in accordance withsome embodiments of the technology described herein.

FIG. 11A shows an illustrative process 1100 for encrypting data using arandomized partitioned permutation cipher (RPPC), in accordance withsome embodiments of the technology described herein.

FIG. 11B shows an illustrative process 1110 for decrypting data that wasencrypted using an RPPC, in accordance with some embodiments of thetechnology described herein.

FIG. 12A shows using an RPPC, with a selected language, to encrypt aplaintext symbol to obtain a corresponding ciphertext symbol, inaccordance with some embodiments of the technology described herein.

FIG. 12B illustrates selecting a language to use for encrypting datausing an RPPC, in accordance with some embodiments of the technologydescribed herein.

FIG. 12C shows an illustrative transformation of a language, inaccordance with some embodiments of the technology described herein.

FIG. 12D illustrates using an RPPC to perform encryption, in accordancewith some embodiments of the technology described herein.

FIG. 12E illustrates generating a decryption vector for use indecrypting ciphertext obtained using an RPPC, in accordance with someembodiments of the technology described herein.

FIG. 13 shows, schematically, an illustrative computer 1300 on which anyaspect of the technology described herein may be implemented.

DETAILED DESCRIPTION

The inventors have recognized and appreciated that many conventionaltechniques for securing communications may be compromised because theyare static in that they rely on encryption (and decryption) methods thatrepeatedly use the same parameters for encrypting (and decrypting)different communications at different times. For example, someconventional techniques for securing communications involve performingsymmetric key encryption using the same symmetric key across multiplecommunications over a period of time (e.g., minutes, days, weeks, etc.).This approach is vulnerable to cryptanalysis attacks, as an attacker maybe able to detect patterns in the ciphertext and thereby recover oralter some or all of the corresponding plaintext without being detected,for example, by determining the symmetric key used for encryption. Oncea symmetric key is compromised, so are any past or future communicationsencrypted with the key. Similarly, if a malicious third party were todetermine any other parameters used by the encryption software toencrypt data, the third party would be able to determine and/or modifysome or all of the information being transmitted, thereby compromisingsecurity.

To address the above-described problem with conventional statictechniques for securing communications, the inventors have developeddynamic secure communication techniques that involve dynamicallyupdating one or more parameters (e.g., a symmetric key) used forencryption and decryption, instead of repeatedly using the sameparameters. The inventors have recognized and appreciated thatdynamically refreshing encryption parameters (e.g., at random times)would increase the security of communications, as their susceptibilityto cryptanalysis techniques would be substantially reduced oreliminated. Accordingly, the inventors have developed techniques forgenerating dynamic changes at an encryption device, and forcommunicating such changes from the encryption device to a decryptiondevice, so that the decryption device can make corresponding changes andstay synchronized with the encryption device.

The inventors have also recognized and appreciated that manyconventional symmetric and asymmetric encryption techniques used tosecure communications depend on fixed algorithms, including one-wayfunctions, and that increases in computing power and techniques (e.g.,quantum computing) put the integrity of these fixed algorithms at risk.In some embodiments, the use of polyalphabetic cipher techniquescombined with probabilistically driven changes to the operatingparameters, data structures, and order of execution of the softwareprogram add additional entropy and thereby increase the complexity andcost of an attacker's efforts to compromise communications.

Accordingly, some embodiments provide for a method comprising using anencryption device to perform: (1) selecting a first operation from aplurality of operations, each of the plurality of operations associatedwith a respective type of data to be encrypted (e.g., a portion of theinput message, a command, a salt, etc.); (2) generating first data to beencrypted by performing the first operation; (3) encrypting both: (a)information identifying the first operation (e.g., informationindicating the command executed, such as an opcode, to perform the firstoperation), and (b) the first data to obtain corresponding firstciphertext; and (4) outputting the first ciphertext (e.g., sending theciphertext, via a communication channel such as the Internet, to anotherdevice, and/or writing the ciphertext to memory for later decryption).In some embodiments, the encryption device may use a software programhaving one or more parameters representing a state to perform the actsof selecting generating, encrypting, and outputting. Alternately, one ormore of these acts may be implemented using hardware. Accordingly, thetechniques described herein may be implemented using software, hardware,or any suitable combination thereof.

The inventors have recognized and appreciated that randomly selectingoperations to be encrypted may improve security of an encryption method.To facilitate randomly selecting an operation, in some embodiments, theplurality of operations may be associated with a respective plurality ofprobabilities. Selecting a first operation at random may include usingthe respective plurality of probabilities to probabilistically selectthe first operation. The plurality of probabilities may be changeddynamically (e.g., at random times) during operation to reduce thepredictability of the encryption method.

In some embodiments, the plurality of operations may include anoperation for obtaining at least a part of input data to be encrypted,an operation for obtaining a salt value, and an operation for changingthe state of the encryption device.

In some embodiments, when the first operation is an operation forobtaining at least a part of input data (e.g., a message to betransmitted) to be encrypted, generating the first data comprisesobtaining a first portion of the input data to be encrypted. Encryptingthe first data may then comprise encrypting the first portion of theinput data.

In some embodiments, when the first operation is an operation forobtaining a salt value, generating the first data comprises obtaining afirst salt value, and encrypting the first data comprises encrypting thefirst salt value. Obtaining the salt value may comprise setting adesired length of the salt using one or more sources of randomness, andgenerating a salt value having the desired length using one or moresources of randomness (e.g., a random number generator, informationassociated with one or more of the previously executed plurality ofoperations, etc.).

In some embodiments, when the first operation is an operation forchanging the state of the encryption device, generating the first datamay comprise generating information indicating one or more changes toone or more values of the one or more parameters in the state of theencryption device. Additionally, encrypting the first data may compriseencrypting the information indicating the one or more changes to thevalues of the one or more parameters in the state of the encryptiondevice.

The inventors have recognized and appreciated that unpredictably anddynamically making changes to the state of an encryption device forencryption may further improve the security of the encryption. In someembodiments, changing the state of the encryption device may comprisechanging one or more values of one or more respective parameters of theencryption device (e.g., one or more parameters of encryption softwarerunning on the encryption device, one or more parameters accessed bycircuitry of the encryption device, etc.).

In some embodiments, the state of the encryption device may be changedby combining the one or more values of the one or more currentparameters with one or more random values obtained from one or moresources of randomness (e.g., a random number generator, previouslyexecuted operations). Combining the one or more values of the one ormore parameters with one or more random values may comprise using arotation operation, an exclusive OR operation, a modular additionoperation, a binary logic operation, and/or any other suitable type ofoperation.

Encrypting the first data to obtain corresponding first ciphertext, insome embodiments, comprises using an encryption module of the softwareprogram. Encrypting the first data correspondingly may compriseencrypting the first data using an encryption technique (e.g., a blockcipher, a stream cipher, a substitution cipher, a polyalphabetic cipher,a public key encryption algorithm, symmetric-key encryption algorithm,and/or any suitable encryption algorithm). The encryption module mayadditionally comprise a state, which includes one or more parameters.These parameters may include, for example, a symmetric key, aninitialization vector for a block cipher, an initialization vector for astream cipher, a message authentication code (MAC), and/or asubstitution alphabet for a polyalphabetic cipher. As discussed above,when the first operation is an operation for changing a state of thesoftware program, the state of the encryption module may be changed.

The inventors have further recognized and appreciated that performingcertain types of transformations (e.g., whitening transformations) onthe plaintext before encryption and/or the ciphertext obtained as aresult of the encryption may decrease correlation between ciphertext andone or more other observables (e.g., plaintext message, devicecharacteristics, etc.) and improve security of the encryption. Suchtransformations may increase the complexity and cost of side-channelattacks. For example, such transformations may decorrelate the physicaloperating characteristics of the hardware (e.g., power consumption,electromagnetic emissions, temperature, etc.) from the operation of thesoftware program. Transformations may be performed using one or morerandom values obtained from a random number generator and/or one or moreof the plurality of operations previously executed by the encryptiondevice. A transformation may be applied to the first data after it isgenerated to obtain transformed first data such that encrypting thefirst data comprises encrypting the transformed first data. Atransformation may be applied to the first ciphertext prior tooutputting the first ciphertext such that the output first ciphertext istransformed ciphertext.

Some embodiments provide a method for decrypting ciphertext using adecryption device to perform: (1) obtaining a first ciphertext; (2)decrypting the first ciphertext to obtain corresponding first plaintext;(3) identifying, from the first plaintext, a first operation of aplurality of operations, wherein the first operation is an operation forchanging a state of the decryption device (e.g., an operation forchanging the state of decryption software executing on the decryptiondevice); and (4) performing the first operation to change the state ofthe decryption device. In some embodiments, the decryption device mayuse a software program to perform the above-described acts of obtaining,decrypting, identifying, and performing. Alternately, one or more ofthese acts may be implemented using hardware. Accordingly, theencryption and decryption techniques described herein may be implementedusing hardware, software, or any suitable combination thereof.

In some embodiments, a second operation may be identified from theplurality of operations. The second operation may be an operation forobtaining a portion of an input message to be output. Performing thefirst operation may comprise obtaining the portion of the input messagefrom the first plaintext.

Decrypting the first ciphertext to obtain corresponding first plaintext,in some embodiments, comprises using a decryption module of the softwareprogram. The decryption module may comprise instructions forimplementing a block cipher, a stream cipher, a substitution cipher, apolyalphabetic cipher, a public key encryption algorithm, asymmetric-key encryption algorithm, and/or any suitable encryptionalgorithms. The decryption module may include one or more parameterssuch as, for example, a symmetric key, an initialization vector for ablock cipher, an initialization vector for a stream cipher, and/or asubstitution alphabet for a polyalphabetic cipher. The values of theseparameters may be changed so that the decryption device remainssynchronized with the encryption device.

While the dynamic secure communication techniques described herein maybe used with any cipher (e.g., Advanced Encryption Standard (AES),Rivest-Shamir-Adleman (RSA), etc.), the inventors have also developed anew cipher for use in the dynamic secure communication techniquesdescribed herein. The new cipher developed by the inventors may bereferred to herein as a randomized partitioned permutation cipher(RPPC).

In some embodiments, an RPPC may be a polyalphabetic cipher associatedwith a plurality of languages, each language being associated with a setof ciphertext symbols, a permutation for the set of ciphertext symbols,and a partition for the permutation. The RPPC may be used to mapplaintext symbols to ciphertext symbols using one or multiple languages.A single language is used to encode a plaintext symbol to obtain acorresponding ciphertext symbol. However, in some embodiments, differentlanguages may be used to map different plaintext symbols tocorresponding ciphertext symbols. As such, the RPPC may be considered asa probabilistic polyalphabetic cipher, with the underlying languagesbeing changed at random times.

In some embodiments, for a given language, mapping a plaintext symbol toa ciphertext symbol may involve performing: (1) obtaining, from theinput data, a first plaintext symbol; (2) mapping the first plaintextsymbol to a first ciphertext symbol using the cipher, the mappingcomprising: (a) identifying a first set of candidate ciphertext symbolsusing the first plaintext symbol, the first permutation, and the firstpartition; and (b) identifying, at random, the first ciphertext symbolfrom the first set of candidate ciphertext symbols; and (3) outputtingthe first ciphertext symbol (e.g., transmitting the first ciphertextsymbol via a communication channel, storing the first ciphertext symbolin memory, etc.).

In some embodiments, a language to be used for encryption may beselected from the plurality of languages before mapping the firstplaintext symbol to the first ciphertext symbol. In some embodiments,selecting the first language may comprise obtaining (e.g., generatingusing a source of randomness or accessing) the first permutation for thefirst set, obtaining (e.g., generating using a source of randomness oraccessing) the first partition for the first permutation, and/orobtaining (e.g., generating or accessing) a first decryption vectorcorresponding to the first permutation and the first partition. Thefirst partition may associate each ciphertext symbol in the first set ofciphertext symbols with one of multiple subsets of the first set ofciphertext symbols. The multiple subsets may be mutually disjoint, and aunion of the multiple subsets may include the first set of ciphertextsymbols. Multiple subsets may each contain a same number of ciphertextsymbols, or multiple subsets may each contain a different number ofciphertext symbols.

In some embodiments, the plurality of languages may include a secondlanguage associated with the first set of ciphertext symbols, a secondpermutation for the first set and different from the first permutation,and a second partition for the first permutation. Accordingly, someembodiments provide for a method further comprising: (1) obtaining, fromthe input data, a second plaintext symbol; (2) mapping the secondplaintext symbol to a second ciphertext symbol using the randomizedpartitioned permutation cipher, the mapping comprising: (a) identifyinga second set of candidate ciphertext symbols using the second plaintextsymbol, the second permutation, and the second partition; (b)identifying, at random, the second ciphertext symbol randomly from thesecond set of candidate ciphertext symbols; and (3) outputting thesecond ciphertext symbol. The method may comprise selecting the secondlanguage from the plurality of languages after outputting the firstciphertext symbol and before mapping the second plaintext symbol to asecond ciphertext symbol.

The inventors have recognized and appreciated that performing atransformation (e.g., whitening, renaming, and/or assigning) on thefirst ciphertext symbol after outputting the first ciphertext symbol andbefore transmitting the first ciphertext symbol may improve security ofthe cipher developed by the inventors. Accordingly, a method is providedfor storing previous ciphertext symbols output by an encryptionalgorithm and combining the first ciphertext symbol with one or morepreviously stored ciphertext symbols.

Some embodiments provide for a method of decrypting ciphertext using acipher and at least one computer hardware processor to perform: (1)obtaining, from the encrypted data, a first ciphertext symbol; (2)obtaining a first decryption vector for the first language; (3) mappingthe first ciphertext symbol to a first plaintext symbol using the firstdecryption vector; and (4) outputting the first plaintext symbol.

As described above, the inventors have further recognized andappreciated that security of communications may be improved by providingmethods for detecting tampering (e.g., with the encryption device, thecommunication channel, etc.).

In some embodiments, tamper detection may be facilitated by: (1) usingonly a subset of potential ciphertext symbols to represent plaintextsymbols at the encryption side; and (2) detecting tampering if anyciphertext symbols not in that subset are detected at the decryptionside. For example, in some embodiments, tamper detection may be providedby identifying a subset of active ciphertext symbols among the first setof ciphertext symbols, such that only ciphertext symbols of the subsetof active ciphertext symbols should appear in a transmitted stream ofciphertext. In turn, tampering may be detected at least in part bydetermining whether the ciphertext symbols received over thecommunication channel are in the active subset of ciphertext symbols.For example, detecting a ciphertext symbol not in the active subset atthe decoding device may indicate that tampering has occurred (e.g., atthe encryption device, on the communication channel, etc.).

It should be appreciated that the techniques described herein may beimplemented in any of numerous ways, as the techniques are not limitedto any particular manner of implementation. Examples of details ofimplementation are provided herein solely for illustrative purposes.Furthermore, the techniques disclosed herein may be used individually orin any suitable combination, as aspects of the technology describedherein are not limited to the use of any particular technique orcombination of techniques.

FIG. 1 shows an illustrative communication system 100, in accordancewith some embodiments. In this example, the communication system 100includes an encryption device 110 configured to communicate with adecryption device 140 via a communication channel 130. In someembodiments, the encryption device 110 may be implemented in hardware,in software, or using any suitable combination thereof. For example, insome embodiments, the encryption device 110 may be implemented entirelyor at least in part using an Application Specific Integrated Circuit(ASIC), a Field-Programmable Gate Array (FPGA), and/or any othersuitable type of circuitry. As another example, in some embodiments, theencryption device 110 may be implemented by programming one or morecomputer hardware processors to perform the functionality describedherein. For example, in some embodiments, encryption device 110 may beconfigured to implement an encryption software program 120 to performone or more functions of the encryption device 110.

Similarly, in some embodiments, the decryption device 140 may beimplemented in hardware, in software, or using any suitable combinationthereof. For example, in some embodiments, the decryption device 140 maybe implemented entirely or at least in part using an ApplicationSpecific Integrated Circuit (ASIC), a Field-Programmable Gate Array(FPGA), and/or any other suitable type of circuitry. As another example,in some embodiments, the decryption device 140 may be implemented byprogramming one or more computer hardware processors to perform thefunctionality described herein. For example, in some embodiments,decryption device 140 may be configured to implement a decryptionsoftware program 150 to perform one or more functions of the decryptiondevice 140.

In some embodiments, the encryption device 110 may receive an inputmessage 113 from a first user (e.g., Alice) or a first softwareapplication (not shown), encrypt the input message 113 into a ciphertextmessage using an encryption software program 120, and transmit theciphertext message over the communication channel 130 to the decryptiondevice 140. The decryption device 140 may decrypt the ciphertext messageusing a decryption software program 150 into an output message 143, andprovide the output message 143 to a second user (e.g., Bob) or a secondsoftware application (not shown).

In some embodiments, the communication channel 130 may be establishedusing one or more wired links, one or more wireless links, and/or anysuitable combination thereof. Communication channel 130 may beestablished over one or more public and/or private networks (e.g.,Internet, a corporate Intranet, a local area network, a wide areanetwork, etc.).

In addition to, or instead of, sending information over communicationchannel 130, encryption device 110 may store information in a data store(e.g., a database, memory, cloud storage, etc.). In some suchembodiments, decryption device 140 may be configured to accessinformation from the data store.

In some embodiments, an eavesdropper (e.g., Eve) may be able to read,delete, insert, and/or modify data transmitted over the communicationchannel 130. For instance, the eavesdropper may be able to interceptand/or spoof packets sent by the encryption device 110 to the decryptiondevice 140 over a network. Additionally, or alternatively, theeavesdropper may have access to a data store shared by the encryptiondevice 110 and the decryption device 140.

In some embodiments, the encryption software program 120 may include acontrol module 122. In some embodiments, control module 122 may select,from a plurality of operations, an operation which is to be performed byencryption software program 120. For example, control module 122 mayselect an operation from one of a plurality of operations including, butnot limited to, (1) an operation for obtaining at least a portion of aninput message to be output (e.g., encrypted and transmitted overcommunication channel 130 or encrypted and stored in a data store), (2)an operation for obtaining a salt value (e.g., an operation forobtaining multiple random bits to be encrypted and transmitted overcommunication channel 130 or encrypted and stored in a datastore), and(3) an operation for changing the state of the encryption device 110(e.g., an operation for changing one or more parameter values ofencryption software 120 executing on the encryption device 110). Forbrevity, these three operations may be referred to herein as “input”,“salt”, and “change state” operations.

In some embodiments, control module 122 may select one of multipleoperations to be performed using input from one or more sources ofrandomness (e.g., random number generator 111). For example, in someembodiments, control module 122 may select one of a plurality ofoperations to be performed using a respective plurality of probabilityvalues such that each operation is chosen with a probability specifiedby its respective probability value.

For example, when control module 122 selects “input” as the operation tobe performed by encryption software program 120, control module 122 mayobtain a portion (e.g., one or more symbols and/or characters) of inputmessage 113 and send the obtained portion to encryption module 124 forencryption, or cause these acts to occur. Subsequently, the encryptedmessage portion together with encrypted information indicating that the“input” operation was performed, may be transmitted over communicationchannel 130 and/or stored in a data store.

As another example, when control module 122 selects “salt” as theoperation to be performed by encryption software program 120, controlmodule 122 may obtain a salt comprising one or more random values. Insome embodiments, control module 122 may determine a target length ofthe salt using input using one or more sources of randomness (e.g.,random number generator 111), then generate a salt value having thetarget length using input from the source(s) of randomness, and send thegenerated salt to encryption module 124 for encryption (or cause theseacts to occur). Subsequently, the encrypted salt together with encryptedinformation indicating that the “salt” operation was performed, may betransmitted over communication channel 130 and/or stored in a datastore.

As yet another example, when control module 122 selects “change state”as the operation to be performed by encryption software program 120,control module 122 may change the state of the encryption device 110.This may be achieved, for example, by changing one or more parameters ofthe encryption software program and/or of the encryption device (e.g., asymmetric key used to encrypt and decrypt data, one or more parametersof the RPPC, the probability values for selecting from among theoperations, an initialization vector for a block or a stream cipher, asubstitution alphabet for a polyalphabetic cipher, etc.). Control module122 may send, to the encryption module 124, the new parameter values andmay change the state of the encryption device 110 using the newparameter values (or cause these acts to occur). Subsequently, theencrypted parameter values together with encrypted informationindicating that the “change state” operation was performed, may betransmitted over communication channel 130 and/or stored in a datastore.

As shown in FIG. 1, in some embodiments, the control module 122 mayreceive input from a random number generator (RNG) 111 or other entropysource. This input may be used to inject new randomness into theencryption process performed by encoding device 110, for example, asdescribed below in connection with FIG. 2A. However, aspects of thepresent disclosure are not limited to the control module 122 receivinginput from one or more random number generators. In some embodiments,the control module 122 may itself include a random number generator,which may use one or more entropy sources such as measurements ofthermal noise, cosmic radiation, etc. In some embodiments, the randomnumber generator may include a pseudo random number generator seededwith a random input from an entropy source.

In some embodiments, the control module 122 may write one or more bitsof the input message 113 and/or other information into an outgoingbuffer 126 or cause these acts to occur. The control module 122 mayinvoke an encryption module 124 to encrypt content of the outgoingbuffer 126 into ciphertext to be transmitted to (or stored forsubsequent transmission to) the decryption device 140.

In some embodiments, the control module 122 may cause one or more statechanges in the encryption module 124. Such state changes may change howfuture input messages are encrypted. In some embodiments, the controlmodule 122 may cause a state change operation at random, and/or cause astate change at a randomly determined point in time.

In some embodiments, the control module 122 may write into the outgoingbuffer 126 information indicating one or more state changes that theencryption module 124 is undergoing. This information may be encryptedby the encryption module 124, and/or transmitted to the decryptiondevice 140 via the communication channel 130. At the decryption device140, the decryption software program 150 may decrypt this information.

In some embodiments, the decryption software program 150 may include acontrol module 152. The control module 152 may invoke a decryptionmodule 154 to decrypt incoming ciphertext stored in incoming buffer 156and received from, for example, encryption device 110. The controlmodule 152 may identify, from the decrypted ciphertext (herein,“plaintext”) an operation (e.g., an “input” operation, a “salt”operation, or a “change state” operation) that was executed on theencryption device 110 and any information associated with the operation.The operation and associated information may then be used to synchronizethe decryption device 140 with the encryption device 110.

For example, when control module 152 determines that the plaintextindicates that an “input” operation was performed at the encoder device110, the control module 152 may identify a portion of the input message113 in the plaintext and provide that portion as part of the outputmessage 143 to the second user (e.g., Bob) or to a second softwareapplication (not pictured).

As another example, when control module 152 determines that theplaintext indicates than a “salt” operation was performed at the encoderdevice 110, the control module 152 may cause the decryption softwareprogram 150 to identify the transmitted salt value in the text and todisregard it as meaningless.

As yet another example, when control module 152 determines that theplaintext indicates that a “change state” operation was performed at theencoder device 110, the control module 152 may identify, in theplaintext, at least one new value of at least one parameter of thedecryption device, and may update the value(s) of these parameters atthe decryption device 140 accordingly. In this way, the encryptiondevice 110 and the decryption device 140 may stay synchronized, as anyupdates to parameters of the encryption device 110 would be also made tothe corresponding parameters of the decryption device 140. For example,if a symmetric key of a cipher were changed at the encryption device 110to a new value, the new value of the key would be transmitted (inencrypted form) to the decryption device 140 and the symmetric key usedby the decryption module 140 would be updated to reflect the newsymmetric key.

In some embodiments, control modules 122 and 152 may be implementedusing state machines or any other suitable type of finite stateautomata. However, aspects of the technology described herein are notlimited in this respect, as control modules 122 and 152 may beimplemented in any other suitable ways.

As shown in the example of FIG. 1, encryption software program 120includes control module 122, encryption module 124, and outgoing buffer126. However, it should be appreciated that in other embodiments,encryption software program 120 may include one or more other modulesinstead of or in addition to control module 122, encryption module 124,and outgoing buffer 126. For example, in some embodiments, encryptionsoftware program 120 may receive parameters from a different softwareprogram (e.g., instead of control module 122) and/or provide output toanother software program (e.g., instead of to outgoing buffer 126).

As shown in the example of FIG. 1, decryption software program 150includes control module 152, decryption module 154, and incoming buffer156. It should also be appreciated that, in other embodiments,decryption software program 150 may include one or more other modulesinstead of or in addition to control module 152, decryption module 154,and incoming buffer 156. For example, in some embodiments, decryptionsoftware program 150 may receive parameters (e.g., control parametersfrom encryption device 110 (e.g., instead of control module 152) and/orprovide output to another software program (e.g., instead of as anoutput message 143).

Also, as shown in the illustrative example of FIG. 1, encryptionsoftware program 120 receives random bits from a random number generator(RNG) 111. However, in other embodiments, encryption software program120 may be configured to receive one or more random values from anysuitable sources of randomness (sometimes termed “entropy sources”), asaspects of the technology described herein are not limited in thisrespect. For example, as described herein, in some embodiments, one ormore random values may be obtained from historical information thatindicates one or more operations (and, optionally, their parameters)that were previously executed by the encoding device 110.

It should also be appreciated that, although in the illustrative exampleof FIG. 1, the encryption device 110 and decryption device 140 are shownas separate devices, the technology described herein is not limited inthis way. For example, in some embodiments, the encryption anddecryption devices may be part of a same physical device. Such acombination, for example, may be used for securely storing data in adata store (e.g., a hard drive).

FIG. 2A shows an illustrative process 200 for randomized encryption, inaccordance with some embodiments of the technology described herein. Forinstance, the process 200 may be performed by encryption device 110described with reference to FIG. 1. In some embodiments, the process 200may be performed by hardware (e.g., using an ASIC, an FPGA, or any othersuitable circuitry), software (e.g., by executing the software using acomputer processor), or any suitable combination thereof.

At act 202, an operation may be selected from a plurality of operations.Examples of available operations include, but are not limited to, anoperation for obtaining at least a portion of an input message to beoutput, an operation for obtaining a salt value, and an operation forchanging the state of one or more of the encryption device, encryptionsoftware program and/or encryption module. The operation may be selectedby a control module (e.g., illustrative control module 122 of FIG. 1).

In some embodiments, different probabilities may be associated withdifferent operations, respectively. Such probabilities may be selectedbased on tradeoffs among security, energy consumption, throughput, etc.For instance, if a higher probability is assigned to a salt operation,more randomness may be injected, which may improve security, but mayhave lower throughput, and/or use more energy per unit length of inputmessage. Alternately, or additionally, in some embodiments an operationmay be selected based on input from one or more entropy sources (e.g.,illustrative random number generator 111 of FIG. 1).

Next, process 200 proceeds to act 204, where data to be encrypted isgenerated at least in part by performing the operation selected at act202. For example, generating the data to be encrypted may involveselection a portion of an input message (e.g., input message 113), whenthe operation selected at act 202 is an “input” operation. As anotherexample, generating the data to be encrypted may involve generating asalt value, when the operation selected at act 202 is a “salt”operation. As yet another example, generating the data to be encryptedmay involve generating one or more new parameter values for one or moreparameters of the system and/or software performing the process 200, andsetting the parameter(s) to have the new parameter value(s), when theoperation selected at act 202 is the “change state” operation.

In some embodiments, performing an operation may include executing acommand associated with that operation having the appropriateparameters. This is described herein, including with reference to FIG.3.

Next, process 200 proceeds to act 206, where the data generated at act204 is encrypted together with information identifying the operationselected at act 202 to obtain ciphertext. In some embodiments, theciphertext generated in this way may be transmitted over a communicationchannel to a decryption device that, in turn, may decrypt the ciphertextand identify the operation performed. In this way, the decryption devicemay detect when any “change state” operations are performed at theencryption device and update its own state so as to remain synchronizedwith the encryption device.

In some embodiments, an encryption module (e.g., the illustrativeencryption module 124 in the example of FIG. 1) may be invoked toencrypt the generated data to generate corresponding ciphertext at act206. For example, when the selected operation is an operation forobtaining at least a portion of an input message, the generated data maybe a portion of the input message that is read into the encryptionmodule 124. The encryption module 124 may then encrypt the portion ofthe input message and information identifying the ciphertext ascontaining at least a portion of an input message. When the decryptiondevice obtains the ciphertext, the decryption device may decrypt theciphertext and determine from the information identifying the selectedoperation (which would be in the plaintext) that at least a portion ofthe input message was encrypted at the encryption device. In turn, thedecryption device may then pass the at least a portion of the inputmessage on (e.g., to another software program, to a user, etc.).

As another example, when the selected operation is an operation forobtaining a salt, the generated data may be a random value that is readinto the encryption module 124. The encryption module 124 may thenencrypt the random value and information indicating that the ciphertextcontains a salt. When the decryption device obtains the ciphertext, thedecryption device may decrypt the ciphertext and determine from theinformation identifying the selected operation (in the plaintext) that arandom value was encrypted at the encryption device. In turn, thedecryption device may then disregard the random value.

As yet another example, when the selected operation is an operation forchanging the state of the encryption device, the generated data may beone or more new parameter values. Examples of such parameters areprovided herein. The encryption module 124 may then encrypt informationindicating which parameters were changed along with the new parametervalues and information identifying that the “change state” operation wasperformed. When the decryption device obtains the ciphertext, thedecryption device may decrypt the ciphertext and determine, from theplaintext, that the “change state” operation was performed at theencryption device and that the values of one or more particularparameters were modified. In turn, the decryption device may obtain thenew parameter value(s) from the plaintext and set its correspondingparameters to the new value(s) such that the state of the decryptiondevice mirrors the state of the encryption device, enabling securecommunication between the two.

Next, process 200 proceeds to act 208, where the ciphertext generated atact 206 is output. For example, the ciphertext generated at act 206 maybe transmitted to a remote device via a communication channel (e.g., todecryption device 140 via communication channel 130 shown in FIG. 1). Asanother example, the ciphertext generated at act 206 may be stored in amemory for subsequent access (e.g., for subsequent transmission ordecryption). The process 200 may end, or may return to act 202 to selecta next operation. The process 200 may be repeated any suitable number oftimes, as aspects of the technology described herein are not limited inthis respect.

FIG. 2B shows an illustrative process 210 for synchronized decryption,in accordance with some embodiments of the technology described herein.For instance, the process 210 may be performed by illustrativedecryption device 140 shown in FIG. 1. In some embodiments, the process210 may be performed by hardware (e.g., using an ASIC, an FPGA, or anyother suitable circuitry), software (e.g., by executing the softwareusing a computer processor), or any suitable combination thereof.

Process 210 begins at act 212, where ciphertext is obtained. In someembodiments, the ciphertext may be received from an encryption device(e.g., via illustrative communication channel 130). In some embodiments,the ciphertext may be read from a memory.

Next, process 212 proceeds to act 214, where the ciphertext obtained atact 210 is decrypted to obtain corresponding plaintext. In someembodiments, the obtained plaintext may include: (1) informationindicating at least one operation performed by an encoding device (e.g.,an “input” operation, a “salt” operation, and a “change state”operation); and (2) data generated by the encoding device as a result ofperforming the at least one operation.

For example, the obtained plaintext may include: (1) informationindicating that the “input” operation was performed by the encodingdevice; and (2) a portion of an input message that was encrypted andtransmitted by the encoding device. As another example, the obtainedplaintext may include: (1) information indicating that the “salt”operation was performed by the encoding device; and (2) the salt value.As yet another example, the obtained plaintext may include: (1)information indicating that the “change state” operation was performedby the encoding device; and (2) new values for one or more parameters ofthe encoding device (examples of such parameters are provided herein).

The decryption device may perform different actions depending on whichoperation is indicated in the plaintext as having been performed on theencoding device. For example, if the “input” operation was performed,the decoding device may identify a portion of an input message in theplaintext and output it to a user (e.g., Bob) or another softwareapplication program as an output message (e.g., output message 143 ofFIG. 1). As another example, if the “salt” operation was performed, thedecoding device may identify a salt in the plaintext and discard it. Asyet another example, if the “change state” operation was performed, thedecoding device may obtain one or more new parameter values in theplaintext, and set the value(s) of its corresponding parameters to thenew values to stay synchronized with the encoder device.

The acts 216-218 of illustrative process 210 describe one of thepossible actions described above—in particular when a “change state”operation is identified in the plaintext obtained at act 214. Inparticular, at act 216, it is identified from the plaintext that a“change state” operation was performed by the encoder device.Subsequently, process 200 proceeds to act 218 where the state of thedecoder device is updated with the new parameter values obtained in theplaintext. After acts 216-218 are completed, process 210 may return toact 212 so that additional ciphertext is processed.

It should be appreciated that although, in the illustrated process ofFIG. 2B, the operation identified from the plaintext is the “changestate” operation, any other operation may be identified from theplaintext including, but not limited to, the “salt” and “input”operations described herein.

FIG. 3 shows an illustrative state machine 300, in accordance with someembodiments. In some embodiments, the state machine 300 may be used forimplementing encryption software 120 (e.g., including at least a part orall of the illustrative control module 122) in the example of FIG. 1. Insome embodiments, the state machine 300 may be implemented in hardware(e.g., using an ASIC, an FPGA, or any other suitable circuitry),software (e.g., by executing the software using a computer processor),or any suitable combination thereof.

In this example, the state machine 300 includes a command generator 304,which may be configured to generate a series of commands to be executedby the state machine 300. The commands described with reference to FIG.3 may be used to implement respective operations. Thus, as describedherein including with reference to the illustrative examples of FIGS. 3and 4, executing a command results in performance of the respectiveoperation (for example, executing an “Input” command described belowresults in the performance of the “input” operation described above,etc.). In some embodiments, the command generator 304 may selectcommands (e.g., one at a time) from a plurality of available commands(each command representing a respective operation). However, that is notrequired. In some embodiments, the command generator 304 may constructone or more commands, in addition to, or instead of, selecting one ormore commands. For instance, to generate a next command in the series,the command generator 304 may select an opcode from a plurality ofopcodes in a suitable instruction set architecture (ISA), and constructa command by providing one or more operands for the opcode. An opcodemay comprise one or more alphanumeric symbols specifying an operation tobe performed.

In some embodiments, the command generator 304 may generate one or morecommands probabilistically. For instance, the command generator 304 mayselect an opcode from a plurality of opcodes according to a suitableprobability distribution over the plurality of opcodes. This may beimplemented in any suitable manner. In some embodiments, the pluralityof opcodes may be stored in a data structure (e.g., a list), where anumber of appearances of each opcode may be proportional to aprobability assigned to the opcode. As an example, an ISA may have threeopcodes, which are assigned, respectively, probabilities 0.5, 0.25, and0.25. The opcode assigned probability 0.5 may appear twice, whereas theother two opcodes may each appear once. In this manner, two random bitsfrom a random number generator may be used to select an opcode from thedata structure, where each of the three opcodes in the ISA may beselected with the respective assigned probability.

Additionally, or alternatively, the command generator 304 may use randominput to provide an operand for a selected opcode. For instance, aselect opcode (e.g., Salt) may indicate that a salt is to be encryptedand placed in an outgoing buffer (e.g., the illustrative outgoing buffer126 in the example of FIG. 1), and an operand for this opcode mayindicate a length for the salt. The command generator 304 may use afirst set of random bits from a random number generator to select alength. Additionally, or alternatively, the command generator 304 mayuse a second set of random bits from the random number generator toprovide a salt of the generated length.

In some embodiments, the command generator 304 may construct a commandbased on a selected opcode and/or one or more operands. The command maybe placed into a command buffer 306. In some embodiments, a commandstored in the command buffer 306 may be sent to an encryption module(e.g., the illustrative encryption module 124 in the example of FIG. 1)as plaintext to be encrypted. The encryption module may implement ablock cipher or a stream cipher, and may return a ciphertextcorresponding to the plaintext command. The ciphertext may be placedinto the outgoing buffer for transmission via a channel (e.g., theillustrative communication channel 130 in the example of FIG. 1).Additionally, or alternatively, the plaintext command and/or thecorresponding ciphertext may be placed into a history buffer (notshown), which may be part of state information 310.

In some embodiments, a command interpreter 308 may read and interpretcommands from the command buffer 306. According to a command beinginterpreted, the command interpreter 308 may update the stateinformation 310 and/or perform one or more other actions.

It should be appreciated that any suitable opcode may be used inaddition to, or instead of, the Salt command described above. Forinstance, in some embodiments, an Input opcode may be used thatindicates that an input of a desired length is to be read from an inputbuffer 302, which may store input messages (e.g., the illustrative inputmessage 113 in the example of FIG. 1) from a user (e.g., Alice in theexample of FIG. 1) and/or a software application. The command generator304 may read a suitable number of bits from the input buffer 302, andmay use those bits to generate an appropriate command to be placed intothe command buffer 306. For instance, the command generator 304 maygenerate a command that, when executed, returns the bits read from theinput buffer 302. In some embodiments, the command may be a constantfunction that takes zero or more inputs, and returns a same value (i.e.,the bits read from the input buffer 302) regardless of input.

In some embodiments, a SaveState opcode may indicate that some or all ofthe state information 310 is to be saved in a data store (not shown).The data store may, although need not, be a persistent storage. Thecommand generator 304 may place a corresponding command into the commandbuffer 306. Upon reading the command from the command buffer 306, thecommand interpreter 308 may save the indicated state information. Forinstance, the state information 310 may include a plurality of statevariables. Current values of one or more of these state variables may besaved in the data store. In some embodiments, the data store may includea content addressable storage, and a hash of the saved values may beused as an index for accessing the saved values from the data store.

In some embodiments, a RestoreState opcode may indicate that some or allof the state information 310 is to be replaced by information previouslysaved in the data store. The command generator 304 may place acorresponding command into the command buffer 306. Upon reading thecommand from the command buffer 306, the command interpreter 308 mayretrieve the indicated information from the data store, and modify thestate information 310 accordingly. For instance, the state information310 may include a plurality of state variables. Current values of one ormore of these state variables may be replaced by respective storedvalues retrieved from the data store.

In some embodiments, a ShutDown opcode may indicate that some or all thestate information 310 is to be saved in the data store, and the statemachine 300 is to be shut down. The indicated state information may besaved in a manner that is similar to that described above for theSaveState opcode.

It should be appreciated that examples of opcodes are provided hereinsolely for illustrative purposes. Moreover, aspects of the presentdisclosure are not limited to using opcodes to generate commands. Forinstance, in some embodiments, the command generator 304 may generate acommand that, when executed, changes one or more random numbergenerators used by the state machine 300. There may be no opcode forthis command. Additionally, or alternatively, this command may be localto the state machine 300, and may not be transmitted in either plaintextform or ciphertext form.

In some embodiments, the state machine 300 may include a parametergenerator 312 configured to generate one or more control parameters forthe encryption module 124. Examples of control parameters include, butare not limited to, a symmetric key used to encrypt and decryptmessages, an initialization vector for a block cipher or a streamcipher, a substitution alphabet for a polyalphabetic cipher, etc.

In some embodiments, the state information 310 may include a statevariable that stores a current value of a control parameter. Theparameter generator 312 may combine the current value of the controlparameter with one or more random values, thereby obtaining a new valueof the control parameter. The new value may be provided to theencryption module 124, and may be used by the encryption module 124 toencrypt a next command from the command buffer 306. Additionally, oralternatively, the state variable in the state information 310 may beupdated with the new value of the control parameter.

The current value of the control parameter may be combined with the oneor more random values in any suitable manner. For instance, one or moreoperations such as rotation, exclusive OR (XOR), modular addition, etc.may be used in any suitable configuration.

In some embodiments, the state machine 300 may obtain the one or morerandom values from a random number generator (e.g., a pseudo randomnumber generator seeded with a random input from an entropy source).Such random values may be stored in the state information 310, and/orprovided to the parameter generator 312.

Additionally, or alternatively, the one or more random values may beobtained based on randomness harvested from a history buffer (not shown)in the state information 310. A history buffer, as used herein, maystore one or more operations previously performed by the encryptiondevice. In some embodiments, one or more portions of the history buffermay be used to harvest randomness. For instance, a most recent entry inthe history buffer, and/or one or more other entries (e.g., two otherentries) may be combined. The one or more other entries may be selectedin any suitable manner, for example, by randomly selecting one or moreoffsets from the most recent entry.

In some embodiments, the history buffer may be a circular buffer of aselected size (e.g., 256 bytes), where a current index may point to themost recent entry. When a new entry is to be written, the current indexmay be advanced, and the new entry may be written at the advanced entry,replacing a least recent entry. However, it should be appreciated thataspects of the present disclosure are not limited to any particularimplementation of a circular buffer, or to using circular buffers atall. In some embodiments, the current index may point to a least recententry. A new entry may be written at the current index before thecurrent index is advanced.

FIG. 4 shows an illustrative state machine 400, in accordance with someembodiments. In some embodiments, the state machine 400 may be used forimplementing decryption software 150 (e.g., including at least a part orall of the illustrative control module 152) in the example of FIG. 1.

In this example, ciphertext messages may be received via a communicationchannel (e.g., the illustrative communication channel 130 in the exampleof FIG. 1), and placed into an incoming buffer (e.g., the illustrativeincoming buffer 156 in the example of FIG. 1). The state machine 400 mayretrieve the ciphertext messages from the incoming buffer forprocessing.

In some embodiments, the state machine 400 may send a ciphertext to adecryption module (e.g., the illustrative decryption module 154 in theexample of FIG. 1) to be decrypted. The decryption module may implementa decryption algorithm, and may return a plaintext corresponding to theciphertext.

In some embodiments, the plaintext may be a command generated by theillustrative command generator 304 in the example of FIG. 3, and thestate machine 400 may place the command into a command buffer 404.Additionally, or alternatively, the ciphertext and/or the correspondingplaintext command may be placed into a history buffer (not shown), whichmay be part of state information 410.

In some embodiments, a command interpreter 406 may read and interpretcommands from the command buffer 404. According to a command beinginterpreted, the command interpreter 406 may update the stateinformation 410 and/or perform one or more other actions. As oneexample, a command generated by the command generator 304 based on theInput opcode may be a constant function that causes the commandinterpreter 406 to return a suitable number of message bits. The commandinterpreter 406 may place the returned bits into an output buffer 408 asan output message (e.g., the illustrative output message 143 in theexample of FIG. 1) to be accessed by a user (e.g., Bob in the example ofFIG. 1) and/or a software application.

The inventors have recognized and appreciated that, by executing aseries of commands generated probabilistically by the command generator304, the state machine 300 may undergo changes in an unpredictablemanner, which may improve security. To allow proper decryption, thestate machine 400 may undergo matching changes. Accordingly, in someembodiments, the series of commands executed by the state machine 300may be transmitted to the state machine 400, which may also execute theseries of commands. In this manner, the state machine 400 may staysynchronized with the state machine 300.

In some embodiments, the series of commands executed by the statemachine 300 may be encrypted prior to being transmitted to the statemachine 400. For instance, the state machine 300 may encrypt a command,its operand, and/or data prior to executing the command. In this manner,the state machine may be at a current state while the command isencrypted, and may move to a new state as a result of executing thecommand. This may allow the state machine 400, which may still be at acurrent state when the encrypted command is received, to correctlydecrypt the encrypted command. The state machine 400 may then executethe decrypted command to also move to a new state.

With reference to the example of FIG. 3, a command, when executed by thestate machine 300, may cause the parameter generator 312 to provide anew value of a control parameter to the encryption module 124. Prior toexecuting the command, the state machine 300 may encrypt the command.

Returning to the example of FIG. 4, the encrypted command may betransmitted to the state machine 400, which may decrypt the encryptedcommand, and then execute the decrypted command. This may cause aparameter generator 412 to generate a new value of the controlparameter. The new value may be provided to the decryption module 154,and may be used by the decryption module 154 to decrypt a nextciphertext from the incoming buffer 156.

In some embodiments, the state information 410 may include a statevariable that stores a current value of the control parameter. Theparameter generator 412 may combine the current value of the controlparameter with one or more random values to obtain the new value of thecontrol parameter. In some embodiments, the state variable in the stateinformation 410 may be updated with the new value of the controlparameter.

Although details of implementation are shown in FIGS. 3-4 and describedherein, it should be appreciated that such details are provided solelyfor illustrative purposes. Aspects of the present disclosure are notlimited to any particular manner of implementation.

The inventors have recognized and appreciated that security may beimproved by applying one or more transformations before and/or after aplaintext is encrypted into a ciphertext. This may increase a difficultyof a successful attack, and may improve robustness against side-channelattacks, in particular.

FIG. 5 shows illustrative transformations 523 and 525, in accordancewith some embodiments. For instance, the transformation 523 may beperformed on a command from the illustrative command buffer 306 in theexample of FIG. 3, and a result of transforming the command may beprovided to the illustrative encryption module 124 as plaintext to beencrypted. Additionally, or alternatively, the transformation 525 may beperformed on a ciphertext output by the encryption module 124, and aresult of transforming the ciphertext may be placed into the outgoingbuffer 126.

In some embodiments, the encryption module 124 may implement a cipherwith a plaintext alphabet and a ciphertext alphabet. The plaintextalphabet may be the same as, or different from, the ciphertext alphabet.An example of an alphabet is the set of bit strings of length n for somesuitable n=0, 1, 2, 3, 4, . . . .

-   -   For n=0, a corresponding alphabet has only one symbol, namely,        the empty string.    -   For n=1, a corresponding alphabet has two symbols, namely, 0 and        1.    -   For n=2, a corresponding alphabet has four symbols, namely, 00,        01, 10, and 10.    -   For n=3, a corresponding alphabet has eight symbols, namely,        000, 001, 010, 011, 100, 101, 110, and 111.    -   For n=4, a corresponding alphabet has sixteen symbols, namely,        0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001,        1010, 1011, 1100, 1101, 1110, and 1111.    -   Etc.

In general, an alphabet comprising the set of bit strings of length nmay have at least 2^(n) symbols. The string may have any suitable typeof symbols including numeric symbols, alphabetic symbols, and/or anyother suitable types of symbols, as aspects of the technology describedherein is not limited to a particular type of alphabet.

In some embodiments, the encryption module 124 may implement apolyalphabetic cipher, whereby plaintext symbols may be mapped tociphertext using different alphabets at different times. One example ofsuch a cipher, developed by the inventors, is the randomized partitionedpermutation cipher (RPPC) described herein.

In some embodiments, the transformation 523 may map the symbolsrepresenting a command from the illustrative command buffer 306 to oneor more symbols in the plaintext alphabet of the encryption module 124.For instance, a command may be represented by a first string of symbolsin the plaintext alphabet of a first generated length. Thetransformation 523 may map the command to a second string of symbols inthe plaintext alphabet of the same length, for example, by applying amapping ϕ to each symbol in the first string of symbols (e.g.,substituting ϕ(s) for s, for some s in the plaintext alphabet).

Although the transformation 523 in this example is an endomorphism onthe set of plaintext symbol strings of the first length, aspects of thepresent disclosure are not so limited. In some embodiments, a commandmay be represented in another manner, for example, using an alphabetthat is different from the plaintext alphabet.

In some embodiments, the encryption module 124 may receive as input thesecond string of symbols in the plaintext alphabet, and output a thirdstring of symbols in the ciphertext alphabet. The third string ofsymbols may have a second generated length, which may be the same as, ordifferent from, the length of the first string of symbols and the secondstring of symbols.

In some embodiments, the third string of symbols in the ciphertextalphabet may in turn be provided to the transformation 525 as input. Thetransformation 525 may output a fourth string of symbols in theciphertext alphabet, which may be of the same length as the third stringof symbols. For instance, the transformation 525 may obtain the fourthstring of symbols by applying a mapping ψ to each symbol in the thirdstring of symbols (e.g., substituting ψ(t) for t, for some t in theciphertext alphabet).

Although the transformation 525 in this example is an endomorphism onthe set of ciphertext symbol strings of the second length, aspects ofthe present disclosure are not so limited. In some embodiments, thetransformation 525 may map each symbol in the third string of symbols toa symbol in an alphabet that is different from the ciphertext alphabet.

The inventors have recognized and appreciated that, if the mapping ϕ forthe transformation 523 is one-to-one, then the transformation 523 isinvertible for each ϕ map. Likewise, if the mapping ψ for thetransformation 525 is one-to-one and onto (e.g., a permutation on theciphertext alphabet), then the transformation 525 is invertible. In someembodiments, inverses of the transformations 523 and 525 may be used ina decryption process.

FIG. 6 shows illustrative transformations 653 and 655, in accordancewith some embodiments. For instance, the transformations 655 and 653 maybe, respectively, inverses of the illustrative transformations 523 and525 in the example of FIG. 5.

In some embodiments, the transformation 653 may be performed on amessage retrieved from the illustrative incoming buffer 156 in theexample of FIG. 4. A result of transforming the message may be providedto the illustrative decryption module 154 as ciphertext to be decrypted.Additionally, or alternatively, the transformation 655 may be performedon a plaintext output by the decryption module 154, and a result oftransforming the plaintext may be placed into the illustrative commandbuffer 404 in the example of FIG. 4.

Although two sets of transformations (i.e., 523 and 655, and 525 and653) are described above in connection with FIGS. 5-6, it should beappreciated that aspects of the present disclosure are not so limited.In some embodiments, only one set of the transformations (e.g., 523 and655, or 525 and 653) may be used, or no transformation at all.

FIG. 7 shows an illustrative encryption device 700, in accordance withsome embodiments. For instance, encryption device 700 may be animplementation of the illustrative encryption device 110 of FIG. 1.Encryption device 700 may be implemented in software, in hardware, orany suitable combination thereof.

In some embodiments, encryption device 700 may receive input message 713(e.g., from a user) and may place the input message 713 into the inputbuffer 702, to be read by the command generator 704. In someembodiments, the command generator 704 may be the same as the commandgenerator 304 of FIG. 3. The command generator 704 may select a commandfrom a plurality of commands each of the commands representing arespective operation. The command generator may select a command from aplurality of commands at random using one or more random values obtainedfrom entropy source 711 (which may be a random number generator or anyother suitable source of randomness). The command generator 704 may thenwrite the selected command to the command buffer 706.

In some embodiments, the command buffer 706 may then send the plaintextcommand, operands, and data to S-map 708 and the control module 722. TheS-map 708 may, in some embodiments, be an implementation oftransformation 523 of FIG. 5. S-map 708 may additionally include awhitening transformation in addition to transformation 523. The S-map708 may comprise one or more time-varying transformations (e.g.,transformation 523 and/or a whitener). In some embodiments, thetransformation and/or whitener may be combined into one module, but insome embodiments the transformation and/or whitener may be performedseparately.

In some embodiments, the plaintext (i.e., command symbols) may bewhitened so that any unequal frequency of occurrence of symbols may bereplaced by a set of symbols that are statistically equally likely. Thewhitening acts pointwise in that each input symbol may be equally likelyto be mapped to each output symbol and each association of an outputsymbol with an input symbol may be independent of any other suchassociation. Furthermore, in some embodiments, the association of inputwith output may change randomly over time so that it is not possible topredict the effect of the map in any particular instance.

In some embodiments, the symbols output by the whitener of S-map 708 maybe assigned a representation from the set of input symbols to theencryption device. The choice of representation (e.g., by a number inbinary) may be arbitrary and may change with every symbol assigned. Thechoice of representation may change with a periodic number or anon-periodic number of symbols assigned.

In some embodiments, the time-varying nature of the component maps maycause the S-map 708 to appear to be random. The variability of S-map 708may be controlled by randomness available at both the encryption deviceand decryption device. The variability of S-map 708 may increasesecurity of the encryption by increasing the length of a search to breakthe cipher.

After performing a transformation on the command, S-map 708 may send thetransformed command to the encryption module 724 to be encrypted. Theencryption module may encrypt the command and data and may useparameters 712 from control module 722. Alternately, in someembodiments, parameters 712 may be an implementation of parametergenerator 312 of FIG. 3. The encryption module 724 may then output theencrypted command (e.g., the ciphertext) to O-map 725 and/or H-map 728.The O-map 725 and/or H-map 728 may be implementations of transformation525 of FIG. 5, in some embodiments.

In some embodiments, the O-map 725 may transform the ciphertext togenerate transformed ciphertext. O-map 725 may then write thetransformed ciphertext into outgoing buffer 726. Outgoing buffer 726 maytransmit the transformed ciphertext via communication channel 730.Alternately, outgoing buffer 726 may output the transformed ciphertextto be written to a memory (not pictured).

In some embodiments, the H-map 728 transforms the ciphertext to generatetransformed ciphertext. H-map 728 may also transform parametersindicating a state of the control module 722. H-map 728 may then placethe transformed ciphertext and/or parameters into the history inputregister 718. The transformed ciphertext may then be passed from thehistory input register 718 to the history buffer 720. As such, theinformation in the history buffer 720 includes information indicatingwhich operations and related data were previously executed by the device700.

In some embodiments, history buffer 720 may provide a source of entropybased on previously-encrypted commands for components of encryptiondevice 700.

For example, history buffer 720 may provide entropy to the S-map 708,O-map 725, and H-map 728 in place of or in addition to entropy fromentropy source 711. History buffer 720 may optionally provide entropy tothe encryption module 720 for the encryption process.

FIG. 8 shows an illustrative schematic 800 for selecting a command, inaccordance with some embodiments. For example, schematic 800 may be usedto facilitate selecting a command, as described by command generator 704of FIG. 7.

In some embodiments, commands may be stored in a data structure such asprobabilistic instruction generator vector (PIGV) 810. Each of thecommands may be assigned a probability of selection, P₁ . . . P_(N),such that a first command assigned a higher probability appears moreoften in PIGV 810 than a second command assigned a lower probability. Inthis example, four possible selected commands are shown, but anysuitable number of commands may be stored in PIGV 810. Entropy source811, which may be any suitable entropy source including but not limitedto a random number generator, may be used to select an index in PIGV810, thereby selecting at random a command from PIGV 810. The commandmay then be written to the command buffer 806.

In this example, potential commands for selection include Input 812,Salt 814, Set Values 816, and Test 818. Input 812 may read in one ormore bits of the input message from the input buffer 802. Salt 814 maybe an operation for the generation of one or more random values, asdescribed herein. Set Values 816 may set one or more parameter valuesindicating a state change of the encryption device and/or encryptionmodule. For example, Set Values 816 could set a parameter value of theS-map 708, the O-map 725, or the encryption module 724. Test 818 mayrepresent a command for reading in one or more values from the historybuffer 820 for the purpose of detecting tampering.

FIG. 9 shows an illustrative stream of commands 910 as produced by, forexample, command generator 704 and a corresponding stream of ciphertext920 as produced, for example, by the encryption module 724, according tosome embodiments. In this example, the stream of commands 910 includescommands such as Salt 912, Input 914, Set S-map 916, and Set L-map 918.In the corresponding stream of ciphertext 920, these commands arerepresented as a stream of ciphertext symbols 922. In this example, theciphertext symbols are alphanumeric, but the cipher alphabet need not bealphanumeric as shown in this example.

As may be further appreciated from the example of FIG. 9, the stream ofcommands includes information identifying the operations performed by anencoding device (e.g., the “salt”, “input” and “change state”operation). In this example, the change-state operations represented bycommands 916 and 918 to set the “S-map” to new values and the “L-map” tonew values.

FIG. 10 shows an illustrative decryption device 1000, in accordance withsome embodiments. For instance, decryption device 1000 may be animplementation of the illustrative decryption device 140 of FIG. 1.Decryption device 1000 may be implemented in software, in hardware, orany suitable combination thereof.

In this example, the incoming buffer 1056 may receive transformedciphertext from communication channel 1030. In some embodiments, theincoming buffer 1056 may receive transformed ciphertext from acomputer-readable storage medium. The incoming buffer 1056 may thenwrite the transformed ciphertext to the Inverse O-Map 1025. InverseO-map 1025 may be a transformation like transformation 653 of FIG. 6.Inverse O-map 1025 may apply an inverse transformation to thetransformed ciphertext to output ciphertext. The Inverse O-map 1025 maysend the ciphertext to decryption module 1054 and H-map 1028.

In some embodiments, decryption module 1054 may then decrypt theciphertext based on parameters 1012 from control module 1054. Decryptingthe ciphertext may yield transformed plaintext. Decryption module 1054may output a fault or error signal if it detects an issue withdecrypting the ciphertext (e.g. an incorrect Message AuthenticationCode). Decryption module 1054 may send the transformed plaintext to theinverse S-map 1009.

In some embodiments, the inverse S-map 1009 may be an implementation oftransformation 655 of FIG. 6. Inverse S-map 1009 may additionallycomprise an inverse whitening transformation. Inverse S-map 1009 mayapply an inverse transformation to the transformed plaintext, outputtingplaintext to tampering detector 1011. Tampering detector 1011 may outputa fault signal if it detects tampering (e.g., from an eavesdropper). Forexample, when the command alphabet comprises fewer symbols than theplaintext alphabet, tampering detector 1011 may output an indication ofa fault when the inverse S-map 1009 sends any of the unused commandalphabet symbols.

In some embodiments, the plaintext may then be passed to the commandbuffer 1004, which writes the plaintext to the command interpreter 1006.Command interpreter 1006 may then write the plaintext to the outputbuffer 1008.

In some embodiments, inverse O-map 1025 also passes ciphertext to H-map1028. H-map 1028 may then apply a transformation to the ciphertext, toform transformed ciphertext which may be written to the history inputregister 1018 and then to the history buffer 1020. In this way, thehistory buffers 720 and 1020 of the encryption device 700 and decryptiondevice 1000 may stay synced. Syncing the history buffers 720 and 1020means that the source of entropy within the system is synced, allowingfor synced transformations across both the encryption device 700 anddecryption device 1000.

While any encryption method may be used in the encryption and decryptiondevices described herein (e.g., encryption devices 110 and 700, anddecryption devices 140 and 1000), the inventors have developed a newtype of polyalphabetic cipher, termed the randomized partitionedpermutation cipher (RPPC), which is well suited for implementation withthe encryption and decryption devices described herein. Thus, in someembodiments, the RPPC may be used with the encryption and decryptiondevices described herein. In other embodiments, other encryptionalgorithms such as AES or any other suitable cipher may be used insteadof the RPPC, as aspects of the technology described herein are notlimited by requiring that the RPPC be used as part of the encryption anddecryption devices described herein.

The RPPC is described herein including with reference to FIGS. 11A-11B,(these figures describe the process of encoding a single plaintextsymbol to obtain a corresponding ciphertext symbol using the RPPCconfigured with a single “language”—a term described below) and FIGS.12A-12E (these figures describe how an RPPC may utilize one or multiple“languages” to encode multiple plaintext symbols to obtain correspondingciphertext symbols.

Before describing these figures, some preliminaries. In someembodiments, a randomized partitioned permutation cipher may beassociated with one or multiple languages. Each language includes or isassociated with multiple pieces of information: (1) a set of ciphertextsymbols; (2) a permutation of the set of ciphertext symbols; (3) apartition of the permutation of the set of ciphertext symbols. Eachlanguage may be further associated with a decryption vector, which maybe derived using the partition, as explained below herein.

In some embodiments, a set of ciphertext symbols (which may beconsidered to be an alphabet) may be represented by numeric symbols,alphabetic symbols, alphanumeric symbols, and/or any other suitabletypes of symbols. The set of ciphertext symbols may include any suitablenumber of ciphertext symbols. For example, the set of ciphertext symbolsmay comprise at least 50 symbols, at least 100 symbols, at least 200symbols, 256 symbols, at least 500 symbols, at least 1000 symbols, atleast 10,000 symbols, any number of symbols between 50 and 10,000 or anyother suitable number of symbols. In some embodiments, informationspecifying the set of ciphertext symbols may be stored using anysuitable data structure(s) and in any suitable format, as aspects of thetechnology described herein are not limited in this respect.

A permutation of the set of ciphertext symbols may be a reordering ofthe set of ciphertext symbols. For example, if the set of ciphertextsymbols has the 16 symbols: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15],then [13 4 3 8 6 12 10 5 7 15 2 11 0 9 14 1] is a permutation of the setof ciphertext symbols (it may be thought of as a result of the act ofre-ordering the symbols in the set of ciphertext symbols). If a set ofciphertext symbols includes N symbols, then there are N! permutations ofthe set of ciphertext symbols. In some embodiments, informationspecifying the permutation may be stored using any suitable datastructure(s) and in any suitable format, as aspects of the technologydescribed herein are not limited in this respect.

A partition of a permutation includes multiple subsets of the ciphertextsymbols. In some embodiments, the multiple subsets may be mutuallydisjoint, non-empty proper subsets that cover the set of ciphertextsymbols of the language (so that every ciphertext symbol of the set ofciphertext symbols is included in one of the multiple subsets of thepartition). Continuing with the previous example, the following areexamples of different partitions of the above permutation:

-   -   4 subsets of 4 symbols each: [13 4 3|8 6 12|10 5 7|15 2 11|0 9        14 1]    -   6 subsets of unequal size: [13 4|3 8 6|12|10 5 7 15|2 11|0 9 14        1].

A partition may have any suitable number of subsets.

In some embodiments, to facilitate the detection of tampering by anadversary, only a subset of ciphertext symbols in a language may beused. In such instances, some of the ciphertext symbols are designatedas active, so that they may be used for encoding plaintext symbols,whereas others are inactive and are not to be used for encodingplaintext symbols. In this way, receipt of at least a threshold number(e.g., at least one, at least five, at least 10, etc.) of inactiveciphertext symbols by the decoding device may indicate tampering withthe communication channel or the encoding device.

For example, let the bolded 12 ciphertext symbols be the “active”ciphertext symbols, in the set of ciphertext symbols from the aboveexample. That means there are 12 active symbols (bolded) and fourinactive (not bolded) symbols as shown below:

-   -   [13 4 3 8 6 12 10 5 7 15 2 11 0 9 14 1].

In some such embodiments, the partition of the permutation may be apartition of only the active set (it may be induced by a partition onthe whole set, in some embodiments, as well). Accordingly, the partitionmay be a set of four subsets of the active symbols, each having threesymbols each, with the inactive symbols omitted:

-   -   {13 4 3} {8 6 12} {10 5 7} {15 2 11}.

As described above, in some embodiments, each language is associatedwith a respective decryption vectors, which may be derived from thepartition for the language. Each decryption vector may define a mappingfrom a ciphertext symbol to a plaintext symbol such that the decryptiondevice may, based on the ciphertext symbol and the decryption vector,determine the original plaintext symbol. The decryption vector isdescribed herein including with reference to FIG. 12E.

FIG. 11A shows an illustrative process 1100 for encrypting input datausing an RPPC, according to some embodiments. Process 1100, for example,may be implemented in encryption module 724 of FIG. 7 and run on anysuitable computing device, such as computing device 1300 of FIG. 13. Insome embodiments, the process 1100 may be performed by hardware (e.g.,using an ASIC, an FPGA, or any other suitable circuitry), software(e.g., by executing the software using a computer processor), or anysuitable combination thereof.

In act 1102, a plaintext symbol may be obtained from the input data. Insome embodiments, the plaintext symbol may represent, for example, partof an input message, and may be obtained from an external source (e.g.,a user). Alternately, the plaintext symbol may represent at least a partof a command and/or information identifying a command. The plaintextsymbol may, in some embodiments, be obtained from a command generator(e.g., illustrative command generator 704 of FIG. 7).

Next, process 1100 proceeds to acts 1104 and 1106, where the plaintextsymbol is mapped to a corresponding ciphertext symbol. When using anRPPC to encode a plaintext symbol, a single language is used (thoughdifferent languages may be used for encoding different plaintextsymbols). The mapping is performed by using the permutation andpartition for that single language and, optionally, one or more randomnumbers obtained from any suitable source(s) of randomness. To map aplaintext symbol to a ciphertext symbol, first the plaintext symbol isused to identify a particular subset in the partition of the permutationat act 1104. If there is only one ciphertext symbol in the particularsubset, that is the ciphertext symbol to which the plaintext symbol ismapped. If there are multiple ciphertext symbols in the particularsubset, then one of them is selected at random, at act 1106.

The selected ciphertext symbol is output at act 1108. For example, theciphertext symbol may be transmitted via a communication channel (e.g.,such as illustrative communication channel 130 of FIG. 1) to anotherdevice or stored.

In some embodiments, process 1100 may be repeated any suitable number oftimes to complete encryption of a desired number of plaintext symbols(which may represent a portion or all of an input message, informationidentifying one or more operations performed by an encryption device, asalt value, new parameter values for one or more control parameters ofan encryption device, etc.). In some embodiments, the same language maybe used to encode multiple plaintext symbols. In some embodiments,different plaintext symbols may be encoded using different languages(e.g., different ciphertext symbols, different permutations, differentpartitions, etc.). A new language may be selected for encrypting eachplaintext symbol, after encrypting a threshold number of plaintextsymbols, or after encrypting a random number of plaintext symbols (e.g.,after a number of symbols selected from a discrete probabilitydistribution having one or more desired moments, such as the Poissondistribution for example).

FIG. 11B shows an illustrative process 1110 for decrypting ciphertextusing an RPPC, according to some embodiments. Process 1110, for example,may be implemented in decryption module 1024 of FIG. 10 and run on anysuitable computing device, such as computing device 1300 of FIG. 13. Insome embodiments, the process 1110 may be performed by hardware (e.g.,using an ASIC, an FPGA, or any other suitable circuitry), software(e.g., by executing the software using a computer processor), or anysuitable combination thereof.

In some embodiments, process 1110 may be a method for decrypting dataencrypted by an RPPC such as described in process 1100 of FIG. 11A. Forexample, the encrypted data may be encrypted using a cipher associatedwith a plurality of languages, each language of the plurality oflanguages being associated with a respective set of ciphertext symbols,a permutation for the first set of ciphertext symbols, and a partitionsfor the permutation.

Process 1100 begins at act 1112, where a first ciphertext symbol isobtained from encrypted data. The encrypted data may be received over acommunication channel (e.g., from a transmitter device such as anencoding device 110) or accessed from memory.

Next, at act 1114, a decryption vector may be obtained for the language.The decryption vector may be received over a communication channel,computed from information about the language (e.g., from informationabout the ciphertext symbols (active), permutation, and partition forthe language), or accessed from memory.

Next, at act 1116, the ciphertext symbol is mapped to a plaintext symbolusing the decryption vector. The decryption vector may define themapping from ciphertext symbols to plaintext symbols, as described bythe permutation of the set of ciphertext symbols and the partition ofthe permutation. The decryption device may use the decryption vector toconvert the ciphertext symbol to a plaintext symbol in accordance withthe permutation of the set of ciphertext symbols and the partition ofthe permutation. An example is provided below.

In act 1118, the plaintext symbol may be output by the cipher. In someembodiments, outputting the plaintext symbol may mean, for example,displaying the symbol to a user on a display, storing the symbol, orproviding the plaintext symbol to another software program.

As an example of performing encryption and decryption using processes1100 and 1110, consider the first set of ciphertext symbols to be: [0 12 3 4 5 6 7 8 9 10 11 12 13 14 15]. As above, the permutation of thefirst set of ciphertext symbols may be: [13 4 3 8 6 12 10 5 7 15 2 11 09 14 1], wherein only the first 12 ciphertext symbols have been selectedas active (e.g., usable for representing plaintext symbols): [13 4 3 8 612 10 5 7 15 2 11 0 9 14 1]. A partition may be formed of thepermutation such that there are four subsets of three ciphertext symbolseach: [13 4 3|8 6 12|10 5 7|15 2 11].

Now suppose we wish to encode four plaintext symbols “A”, “B”, “C”, or“D”. Encoding “A” involves identifying one of the subsets in thepartition to correspond to “A”—say {13 4 3}—and then randomly selectingone of the symbols in that partition to represent “A”. Thus any one ofthe symbols “13” or “4” or “3” may be used to represent “A”, and each ofthese symbols may be chosen at random (using any suitable source ofrandomness) such that different occurrences of the plaintext symbol “A”may be mapped to different ciphertext symbols. Similarly, “B” may bemapped to one of the ciphertext symbols in the second subset {8 6 12},“C” may be mapped to one of the ciphertext symbols in the third subset{10 5 7} and “D” may be mapped to one of the ciphertext symbols in thefourth subset {15 2 11}.

In this example, the decryption vector would indicate which ciphertextsymbols are possible representations for a plaintext symbol. Thus, whenthe decryption device receives any one of the ciphertext symbols 13, 4,or 3, it may use the decryption vector to decrypt the ciphertext symboland output the plaintext symbol “A.” In some embodiments, the decryptionvector may also indicate the inactive ciphertext symbols 0, 9, 14, and1, if the decryption device receives any of the inactive symbols 0, 9,14, or 1, this may facilitate detection of tampering.

In the above example, there are 16 ciphertext symbols and 4 plaintextsymbols, but it should be appreciated any suitable number of ciphertextsymbols and plaintext symbols may be used in encryption process 1100, asthe above example is merely illustrative. As another non-limitingexample, there may be 32 plaintext symbols and 256 ciphertext symbols.Additionally, while the plaintext and ciphertext symbols comprisealphanumeric symbols in this example, the plaintext and ciphertextsymbols may include any suitable symbols including but not limited toalphanumeric symbols (e.g., punctuation symbols, mathematical symbols,Greek symbols, etc.).

While the partition in above-described example has a subset comprising 4inactive symbols, in some embodiments, the number of inactive symbolsmay be different. For example, there may be zero inactive symbols, toimprove secrecy of the cipher. Alternately, there may be the same numberof inactive and active symbols, to facilitate testing for tampering.Additionally, in some embodiments, the subsets of the partition may notinclude an equal number of ciphertext symbols, as is the case in theabove-described example.

FIG. 12A shows a schematic illustration of using an RPPC to encryptdata, according to some embodiments. The example of FIG. 12A may be animplementation of acts 1114 and 1116 of FIG. 11A, in which an inputplaintext symbol s may be mapped to an output ciphertext symbol c. Insome embodiments, the encryption may be performed by hardware (e.g.,using an ASIC, an FPGA, or any other suitable circuitry), software(e.g., by executing the software using a computer processor), or anysuitable combination thereof.

FIG. 12A illustrates, for a single language, a corresponding partition1212 of the permutation of a set of ciphertext symbols 1222. In thisexample, permutation 1222 is a permutation of the set of 256 ciphertextsymbols, and the partition 1212 includes 32 subsets.

In this example, the partition 1212 is represented by a data structurehaving multiple pairs of values called “size” and “base”. Each (size,base) pair identifies a specific subset of the partition. In otherwords, the partition has multiple subsets, but each subset may beidentified using a pair of values (size, base) in this implementation(which assumes, for clarity, that elements of the permutation are storedin a linear order and that each subset of the partition includes acontiguous set of elements). The “size” 1214 indicates the number ofelements in the subset of the partition. The “base” 1216 indicates thelocation of the first element in the subset of the partition (e.g., inan implementation where the permuted symbols are stored in an array).

Thus, when mapping a plaintext symbol s to a ciphertext symbol c, theplaintext symbol s may be used as an index of the partition, selecting acorresponding pair (size, base). A random number may then be selected(e.g., by a random number generator or any other suitable entropysource) to identify a ciphertext symbol from among the elements in thesubset of the partition identified by the selected (size, base) pair. Ifthe ciphertext symbols in the subset of the partition are contiguous,then the random number can be used to select one of the elements torepresent the plaintext symbol.

FIG. 12B shows a schematic illustration of a process of selecting alanguage and an associated permutation and partition for encryption,according to some embodiments. In some embodiments, language set index1232 may obtain a random value from one or more sources of randomness.The random value may be used as an index to select a language from amonglanguages 1240 in the language sets 1230.

In some embodiments, language index 1242 may also obtain a random valuefrom one or more entropy sources (e.g., a random number generator, orany other suitable entropy source). The random value selected bylanguage index 1242 may index the languages 1240 to select a specificpartition 1212 and a permutation 1222, as described in FIG. 12A.

To reduce a potential eavesdropper's (e.g., Eve of FIG. 1) ability todetermine which language is being used and/or how plaintext symbols arebeing mapped to ciphertext symbols, the language selection may be passedthrough a transformation. FIG. 12C shows a schematic illustration ofpassing a language through a transformation prior to the language beingused by encryption module 724, in accordance with some embodiments.

In some embodiments, next language index map 1234 may use a random valuefrom one or more entropy sources 1211 to select a next language forencryption. Entropy source 1211 may include harvested entropy from ahistory buffer (e.g., illustrative history buffer 720 of FIG. 7) and/orinjected entropy, whereby injected entropy is entropy created by arandom source in the encryption device and distributed to the decryptiondevice by use of a command. The random value may be combined with avalue of the current language index 1232 to select a next language forencryption. The next language index map 1234 may write this language tothe current language index 1232.

In some embodiments, the current language index 1232 may send thecurrent language index to L-map 1250. L-map 1250 may perform atransformation similar to S-map 708 and/or O-map 725 of FIG. 7. L-map1250 may receive input from entropy source 1213, which may include oneor more of harvested entropy from a history buffer (e.g., illustrativehistory buffer 720 of FIG. 7) and/or injected entropy. Entropy source1213 may be the same or different from entropy source 1211. L-map 1250may then send the transformed language index to the encryption module724 for use in encryption.

FIG. 12D shows a schematic illustration of an RPPC system including amethod of selecting a language using randomly-generated values and amethod of mapping plaintext symbols to ciphertext symbols, according tosome embodiments. This illustrative system may be implemented, forexample, in encryption module 724 of FIG. 7.

In some embodiments, language set index 1232 may be used to selectlanguages 1240 from the language sets 1230. The languages 1240 maycomprise one or more permutations 1220 of a set of ciphertext symbolsand one or more partitions 1210 of each permutation 1220. The languageindex 1242 may be used to select permutations 1220 and partitions 1210of the permutations 1220. A partition index 1236 may select a specificpartition 1212, and a permutation index 1244 may select a specificpermutation of a set of ciphertext symbols 1222 for use in mapping aplaintext symbol s to a ciphertext symbol c. The selected languages 1240and/or permutation 1222 and partition 1212 may be passed through L-map1250, as described in reference to FIG. 12C.

In some embodiments, selecting a language may occur between one or moreinstances of mapping a plaintext symbol to a ciphertext symbol. In someimplementations, a new language may be selected between each instance ofa mapping of a plaintext symbol to a ciphertext symbol. A new languagemay be selected periodically between instances of mapping a plaintextsymbol to a ciphertext symbol. Alternately, a new language may beselected at random intervals between instances of mapping a plaintextsymbol to a ciphertext symbol.

In some embodiments, after a language is selected, it may be used to mapa plaintext symbol s to a ciphertext symbol c using the selectedpermutation of a set of ciphertext symbols 1222 and partition 1212. Whenmapping a plaintext symbol s to a ciphertext symbol c, the plaintextsymbol s may be used as an index of the partition, selecting the size1214 and base 1216 in the permutation for mapping. A random number maythen be selected (e.g., by a random number generator) within the size1214 of the subset of the permutation. The random number may then beused to index the permutation from the base 1216 within the size 1214 ofthe subset. The ciphertext symbol c located at the indexed location maythen be output.

FIG. 12E shows a schematic illustration of selecting and using adecryption vector for decryption using an RPPC, in accordance with someembodiments of the technology described herein. The example of FIG. 12Emay be implemented in the decryption module 1024 of FIG. 10.

In some embodiments, language index 1242 may index the ordered sets ofdecryption vectors 1250 to select a decryption vector 1252. The orderedsets of decryption vectors 1250 may contain a number of decryptionvectors equal to the number of languages. When a ciphertext symbol creaches the decryption module, it may be mapped to a plaintext symbol susing the selected decryption vector 1252. The ciphertext symbol c maybe used to index the decryption vector 1252, such that the correspondingplaintext symbol s is located at the indexed location within thedecryption vector 1252. Then, the plaintext symbol s may be output fromthe decryption vector.

In some embodiments, the output plaintext symbol s may be passed totampering detector 1260. Tampering detector 1260 may be configured toidentify if any output plaintext symbols s from decryption vector 1252are inactive, indicating external tampering. Tampering detector 1260 maybe configured to output an indication of a fault or error when itencounters an inactive plaintext symbol s. When tampering detector 1260encounters an active plaintext symbol s, it may pass on the plaintextsymbol s to the decryption device.

FIG. 13 shows, schematically, an illustrative computer 1300 on which anyaspect of the present disclosure may be implemented.

In the embodiment shown in FIG. 13, the computer 1300 includes aprocessing unit 1301 having one or more processors and a non-transitorycomputer-readable storage medium 1302 that may include, for example,volatile and/or non-volatile memory. The memory 1302 may store one ormore instructions to program the processing unit 1301 to perform any ofthe functions described herein. The computer 1300 may also include othertypes of non-transitory computer-readable medium, such as storage 1305(e.g., one or more disk drives) in addition to the system memory 1302.The storage 1305 may also store one or more application programs and/orresources used by application programs (e.g., software libraries), whichmay be loaded into the memory 1302.

The computer 1300 may have one or more input devices and/or outputdevices, such as devices 1306 and 1307 illustrated in FIG. 13. Thesedevices can be used, among other things, to present a user interface.Examples of output devices that can be used to provide a user interfaceinclude printers or display screens for visual presentation of outputand speakers or other sound generating devices for audible presentationof output. Examples of input devices that can be used for a userinterface include keyboards and pointing devices, such as mice, touchpads, and digitizing tablets. As another example, the input devices 1307may include a microphone for capturing audio signals, and the outputdevices 1306 may include a display screen for visually rendering, and/ora speaker for audibly rendering, recognized text. As another example,the input devices 1307 may include sensors (e.g., electrodes in apacemaker), and the output devices 1306 may include a device configuredto interpret and/or render signals collected by the sensors (e.g., adevice configured to generate an electrocardiogram based on signalscollected by the electrodes in the pacemaker).

As shown in FIG. 13, the computer 1300 may also comprise one or morenetwork interfaces (e.g., the network interface 1310) to enablecommunication via various networks (e.g., the network 1320). Examples ofnetworks include a local area network or a wide area network, such as anenterprise network or the Internet. Such networks may be based on anysuitable technology and may operate according to any suitable protocoland may include wireless networks, wired networks or fiber opticnetworks. Such networks may include analog and/or digital networks.

Having thus described several aspects of at least one embodiment, it isto be appreciated that various alterations, modifications, andimprovements will readily occur to those skilled in the art. Suchalterations, modifications, and improvements are intended to be withinthe spirit and scope of the present disclosure. Accordingly, theforegoing description and drawings are by way of example only.

The above-described embodiments of the present disclosure can beimplemented in any of numerous ways. For example, the embodiments may beimplemented using hardware, software or a combination thereof. Whenimplemented in software, the software code can be executed on anysuitable processor or collection of processors, whether provided in asingle computer or distributed among multiple computers.

Also, the various methods or processes outlined herein may be coded assoftware that is executable on one or more processors that employ anyone of a variety of operating systems or platforms. However, it shouldbe appreciated that aspects of the present disclosure are not limited tousing an operating system. Additionally, such software may be writtenusing any of a number of suitable programming languages and/orprogramming or scripting tools, and also may be compiled as executablemachine language code or intermediate code that is executed on aframework or virtual machine.

In this respect, the concepts disclosed herein may be embodied as anon-transitory computer-readable medium (or multiple computer-readablemedia) (e.g., a computer memory, one or more floppy discs, compactdiscs, optical discs, magnetic tapes, flash memories, circuitconfigurations in Field Programmable Gate Arrays or other semiconductordevices, or other non-transitory, tangible computer storage medium)encoded with one or more programs that, when executed on one or morecomputers or other processors, perform methods that implement thevarious embodiments of the present disclosure discussed above. Thecomputer-readable medium or media may be transportable, such that theprogram or programs stored thereon can be loaded onto one or moredifferent computers or other processors to implement various aspects ofthe present disclosure as discussed above.

The terms “program” or “software” are used herein to refer to any typeof computer code or set of computer-executable instructions that can beemployed to program a computer or other processor to implement variousaspects of the present disclosure as discussed above. Additionally, itshould be appreciated that according to one aspect of this embodiment,one or more computer programs that when executed perform methods of thepresent disclosure need not reside on a single computer or processor,but may be distributed in a modular fashion amongst a number ofdifferent computers or processors to implement various aspects of thepresent disclosure.

Computer-executable instructions may be in many forms, such as programmodules, executed by one or more computers or other devices. Generally,program modules include routines, programs, objects, components, datastructures, etc. that perform particular tasks or implement particularabstract data types. Typically, the functionality of the program modulesmay be combined or distributed as desired in various embodiments.

Also, data structures may be stored in computer-readable media in anysuitable form. For simplicity of illustration, data structures may beshown to have fields that are related through location in the datastructure. Such relationships may likewise be achieved by assigningstorage for the fields with locations in a computer-readable medium thatconveys relationship between the fields. However, any suitable mechanismmay be used to establish a relationship between information in fields ofa data structure, including through the use of pointers, tags or othermechanisms that establish relationship between data elements.

Various features and aspects of the present disclosure may be usedalone, in any combination of two or more, or in a variety ofarrangements not specifically discussed in the embodiments described inthe foregoing and is therefore not limited in its application to thedetails and arrangement of components set forth in the foregoingdescription or illustrated in the drawings. For example, aspectsdescribed in one embodiment may be combined in any manner with aspectsdescribed in other embodiments.

Also, the concepts disclosed herein may be embodied as a method, ofwhich an example has been provided. The acts performed as part of themethod may be ordered in any suitable way. Accordingly, embodiments maybe constructed in which acts are performed in an order different thanillustrated, which may include performing some acts simultaneously, eventhough shown as sequential acts in illustrative embodiments.

Use of ordinal terms such as “first,” “second,” “third,” etc., in theclaims to modify a claim element does not by itself connote anypriority, precedence, or order of one claim element over another or thetemporal order in which acts of a method are performed, but are usedmerely as labels to distinguish one claim element having a certain namefrom another element having a same name (but for use of the ordinalterm) to distinguish the claim elements.

The terms “approximately” and “about” may be used to mean within ±20% ofa target value in some embodiments, within ±10% of a target value insome embodiments, within ±5% of a target value in some embodiments,within ±2% of a target value in some embodiments. The terms“approximately” and “about” may include the target value.

Also, the phraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. The use of“including,” “comprising,” “having,” “containing,” “involving,” andvariations thereof herein, is meant to encompass the items listedthereafter and equivalents thereof as well as additional items.

What is claimed is:
 1. At least one non-transitory computer-readablestorage medium storing processor-executable instructions that, whenexecuted by at least one device, cause the at least one device toperform a method comprising acts of: selecting a first operation from aplurality of operations, each of the plurality of operations associatedwith a respective type of data to be encrypted; generating first data tobe encrypted at least in part by performing the first operation;encrypting, using a randomized partitioned permutation cipher, bothinformation identifying the first operation and the first data to obtaincorresponding first ciphertext; and outputting the first ciphertext. 2.The at least one non-transitory computer-readable storage medium ofclaim 1, wherein each operation of the plurality of operations isassociated with a respective probability of a plurality ofprobabilities, and wherein selecting the first operation comprises:selecting the first operation from the plurality of operations using theplurality of probabilities.
 3. The at least one non-transitorycomputer-readable storage medium of claim 1, wherein the plurality ofoperations includes an operation for obtaining at least a portion of aninput message to be output, an operation for obtaining a salt value, andan operation for changing a state of the at least one device.
 4. The atleast one non-transitory computer-readable storage medium of claim 1,wherein the first operation is an operation for changing a state of theat least one device, and wherein performing the first operation causesat least one parameter in the state of the at least one device to beupdated.
 5. The at least one non-transitory computer-readable storagemedium of claim 4, wherein performing the first operation comprises:updating the at least one parameter using at least one random valueobtained from one or more sources of randomness.
 6. The at least onenon-transitory computer-readable storage medium of claim 4, wherein themethod comprises using a software program to perform the selecting,generating, encrypting and outputting acts, and wherein executing thefirst operation causes at least one parameter in the state of thesoftware program to be updated.
 7. The at least one non-transitorycomputer-readable storage medium of claim 4, wherein encrypting thefirst data is performed using an encryption module having at least oneparameter, and wherein performing the first operation causes at leastone parameter of the encryption module to be updated.
 8. The at leastone non-transitory computer-readable storage medium of claim 7, whereinthe at least one parameter of the encryption module comprises asubstitution alphabet for a polyalphabetic cipher.
 9. The at least onenon-transitory computer-readable storage medium of claim 7, wherein therandomized partitioned permutation cipher is associated with a pluralityof languages including a first language.
 10. The at least onenon-transitory computer-readable storage medium of claim 9, wherein:after outputting the first ciphertext and before selecting a secondoperation from the plurality of operations, the method further comprisesselecting a second language from the plurality of languages.
 11. The atleast one non-transitory computer-readable storage medium of claim 10,wherein the state of the encryption module includes one or moreparameters specifying a permutation of a set of ciphertext symbols andone or more parameters specifying a partition of the permutation. 12.The at least one non-transitory computer-readable storage medium ofclaim 4, wherein performing the first operation comprises changing atleast one probability for selecting an operation from the plurality ofoperations.
 13. The at least one non-transitory computer-readablestorage medium of claim 4, wherein generating the first data comprisesgenerating information indicating at least one update to the at leastone parameter in the state of the at least one device, and whereinencrypting the first data comprises encrypting the informationindicating the at least one update to the at least one parameter. 14.The at least one non-transitory computer-readable storage medium ofclaim 1, wherein when the first operation is an operation for obtaininga salt value, generating the first data comprises obtaining a first saltvalue, and encrypting the first data comprises encrypting the first saltvalue.
 15. The at least one non-transitory computer-readable storagemedium of claim 14, wherein obtaining the first salt value comprises:determining a target length of the first salt value using one or moresources of randomness; and generating, as the first salt value, a valuehaving the target length using the one or more sources of randomness.16. The at least one non-transitory computer-readable storage medium ofclaim 15, wherein the one or more sources of randomness includeinformation associated with one or more of the plurality of operationspreviously performed by the at least one computing device.
 17. The atleast one non-transitory computer-readable storage medium of claim 1,wherein when the first operation is an operation for obtaining at leasta part of input data to be encrypted, generating the first datacomprises obtaining a first portion of an input message to betransmitted; and encrypting the first data comprises encrypting thefirst portion of the input message.
 18. The at least one non-transitorycomputer-readable storage medium of claim 1, wherein the method furthercomprises: transforming the first data after it is generated to obtaintransformed first data, wherein encrypting the first data comprisesencrypting the transformed first data.
 19. A system, comprising: atleast one processor; and at least one non-transitory computer-readablestorage medium storing processor-executable instructions that, whenexecuted by the at least one processor, cause the at least one processorto perform: selecting a first operation from a plurality of operations,each of the plurality of operations associated with a respective type ofdata to be encrypted; generating first data to be encrypted at least inpart by performing the first operation; encrypting, using a randomizedpartitioned permutation cipher, both information identifying the firstoperation and the first data to obtain corresponding first ciphertext;and outputting the first ciphertext.
 20. A method for decryptingreceived ciphertext at a decryption device, the method comprising: usingthe decryption device to perform: obtaining a first ciphertext generatedusing a randomized partitioned permutation cipher; decrypting the firstciphertext to obtain corresponding first plaintext; identifying, fromthe first plaintext, a first operation of a plurality of operations,wherein the first operation is an operation for changing a state of thedecryption device; and performing the first operation to change thestate of the decryption device.